PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
I dont know why, but you were right feyd. Register globals was not on. Even though I have a php.ini file with "register_globals = On" in it. I did the $_POST method. It works. Thanks!
EDIT:
It worked once, now it doesnt work. I dont get it!
Do yourself a favor for down the road, write all your scripts as if register_globals is off and remember to initialize all variables before using them.
As a side note, wash behind your ears and wear clean undies when taking to the road.
I have the script written correctly, I think? But it still does not work. It worked one time. My hosting company says that register globals is turned on.
do some debugging. echo out what $switch or whatever you call it now is. Make sure you are getting the correct output in the HTML. Output good HTML (all attribute values should be in quotes). Run phpinfo()..
feyd wrote:do some debugging. echo out what $switch or whatever you call it now is. Make sure you are getting the correct output in the HTML. Output good HTML (all attribute values should be in quotes). Run phpinfo()..
I echoed out $switch. That was the problem, but I didnt solve it. It was echoing switch to be 3 for every row.
But when I view the source of the page switch is different for each form.
EDIT:
Found the error!
The error was because I was not ending the form for each row.