As I said, you can just eliminate the code that's not needed. You'd just delete the final line and lines 1-4. And optionally, replace the 5th line with my example, but do that only once the existing code works. The debug echo is just something you can sprinkle throughout your code as a tracer to see which lines aren't being executed but should be, or are being executed but shouldn't, or to inform of unexpected values in identifiers and variables.