mardi 31 mars 2015

PHP How to pass checkbox states after POST

I have a quick question but I seem to be having trouble locating the answer. (possibly my wording) but here goes.


I was able to echo POST data from a form for the text/number variables without a hitch! but I am running in to a brick wall over these checkbox values. I know that if you POST a checkbox it will post a value of "on" but lets say on the form if checkbox1 is checked, how to I make a corresponding checkbox on the POST page load already checked? I know in html all you have to do is simply write "checked" within the code so I tried using an "if" statement to get the job done but I couldn't seem to get it working. Any help is much appreciated!


Thanks!





Aucun commentaire:

Enregistrer un commentaire