Always know whether checkbox is/was checked or not

wnm07

New Member
My webpage looks like this\[code\]<form id="1" ...></form><form id="2" ...><?phpif(//what?) echo '<input type="checkbox" name="aktualisieren" value="http://stackoverflow.com/questions/15716455/yes" id="aktualisieren" checked>refresh';else echo '<input type="checkbox" name="aktualisieren" id="aktualisieren" value="http://stackoverflow.com/questions/15716455/no">refresh';?> </form>\[/code\]Goal is to always know whether checkbox aktualisieren is checked/was checked before page was submitted and to transfer the state and save it to a variable. So if aktualisieren was checked, it should be checked now and some variable $checked should be true and vice versa for unchecked. Problem occurs when form 1 is submitted while form 2 contains the checkbox, so there will be no field in $_POST for checkbox then.
 
Back
Top