Page 1 of 1

Modifying HTML forms using php checkbox question?

Posted: March 5th, 2011, 7:50 am
by darcisharma
I've asked this before and people didn't give the correct answer. I have a form that goes to a php validation file, and if something is wrong it sends you back to the form page, and fills in the same values you put in before submitting. On one part of this form there are multiple checkboxes that post as an ARRAY (there is more than one checkbox associated with the array variable, so a simple if(isset(variable == "blah") echo "checked"; WILL NOT WORK FOR ME). My question is, how do I get the php to check the boxes the user checked before submitting the form.

Re: Modifying HTML forms using php checkbox question?

Posted: June 23rd, 2012, 5:20 pm
by lucy123
darcisharma wrote:I've asked this before and people didn't give the correct answer. I have a form that goes to a php validation file, and if something is wrong it sends you back to the form page, and fills in the same values you put in before submitting. On one part of this form there are multiple checkboxes that post as an ARRAY (there is more than one checkbox associated with the array variable, so a simple if(isset(variable == "blah") echo "checked"; WILL NOT WORK FOR ME). My question is, how do I get the php to check the boxes the user checked before submitting the form.
Hi. have you found the answer to this? I am having the same problem. I tried isset varibale == ...aren't you supposed to have one equal sign there and not 2? The weird thing is my form works in firefox but not in any other browser. sorry. I hope you understand my question English is not my native language.