Modifying HTML forms using php checkbox question?

Struggling with PHP or HTML? Got any tips? Drop in here to share your questions and answers. Newbies and gurus welcome!

Modifying HTML forms using php checkbox question?

Postby darcisharma » March 5th, 2011, 7:50 am

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.
User avatar
darcisharma
Rank 0
Rank 0
 
Posts: 1
Joined: March 2nd, 2011, 2:28 am

Re: Modifying HTML forms using php checkbox question?

Postby lucy123 » June 23rd, 2012, 5:20 pm

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.
English is not my native language.
User avatar
lucy123
Rank 0
Rank 0
 
Posts: 1
Joined: June 23rd, 2012, 5:11 pm


Return to PHP & HTML Questions

Who is online

Users browsing this forum: No registered users and 1 guest

cron