Results 1 to 3 of 3
Sep 22, 2008, 07:38 #1
- Join Date
- Sep 2007
- 0 Post(s)
- 0 Thread(s)
How do I make checkboxes stay checked?
Thats it basically. I have a page with checkboxes, if I check a box when I refresh the page the box is unchecked. How do I stop this happening?
Sep 22, 2008, 08:37 #2
Sep 22, 2008, 08:37 #3
you sure you mean refresh? If you mean submit then you just check to see if the checkbox was checked and if so check it!
<input type="checkbox" name="check" value="checked" <?php if($_POST['check'] == 'checked'): ?>checked="checked"<?php endif; ?> />