This problem is straight out of the twilight zone. I don’t expext to get an answer because the problem doesn’t even make sense.
I was up all last night trying to complete some code. But it wouldn’t work. I woke up this morning thinking that after a break, the solution will be staring at me in the face. I was wrong.
I tried to work out what the deal is for hours. I EVEN retyped the whole code manually (instead of copy and paste), just in case there was some character wrong that I was blind to. But, the problem is the same.
So, I figure: Ok, the server must have its wires crossed or something. So I restarted the server. I still have the same problem.
I am completely and utterly out of solutions, and if I can’t work out what the deal is, I am going to have to completely restart the code which will take me all day.
But I don’t see how {{{{anything}}}} in the code could possibly cause that problem!
If:
echo $_POST[‘category’];
returns:
2-category.php
THEN echo $_POST[‘category’]; {{{IS}}} 2-category.php
By the way, if I rewrite the whole page from scratch and I get the same problem, you’ll probably see me on CNN or something, with a police psychologist trying to talk me down…
Yes… and it has a coronary… and soon I am going to, if the code doesn’t start making sense.
Anyway, I have totally started rewriting the entire page.
Something, somewhere is just making php go spastic. I am sick of dealing with it. So, I’ll start again, should be done in a few hours. I am not spending another 24 hours trying to work out something that can’t be worked out.
I really hate coding. I only do it because I have to…
Well in your code do you have a check to see if the post variable is present first? Try adding $fetch_category = ‘’; at the top of your script and see what happens. Remember its a notice, not a error/warning. If that doesnt work going to see more of the code.
Again your problem is a notice, its saying the variable has not been defined yet. We need to see more code to help you out on this. Just because the value of post echos out correctly doesnt mean the variable was defined.
This is one reason why many people when fiddling around with forms would change all of the above POST references to GET, so they can just mess with the arguments in the URL string and press refresh to be sure they are getting false results from F5 refreshes.
Then change them back to POST when all is looking good.