Hi
I have simple single page form with a couple of check boxes.
If a checkbox is set then a session is enabled.
When I reload the page I would like the checkbox to show if it's set or not.
Likewise if the checbox is unset, I'd like to unset the session.. and have the checkbox reflect this.
This is what I have so far :
the check box is named 'cb'
if (isset($_POST['cb']))
{
$_SESSION['cb']="on";
$cb="checked";
}else{
unset($_SESSION['cb']);};
<input type='checkbox' name='cb' value='ON' $cb>
Obviously it's not working.. can anyone point me in the right direction.
Thanks