Hi people!
I have this code:
if ($_POST['remember'] == true)
{
// COOKIES ON!
$time = time() + 20000;
setcookie(user, $username, $time);
setcookie(pass, $password, $time);
header("Location: index.php");
echo "<h1 class='welcome'>Welcome ".$_COOKIE['user']." |</h1>";
echo "<div id='divlogin' style='visibility:hidden'></div>";
echo "<a href='logout.php'><h1 class='logout'><b>Logout</b></h1></a>";
}elseif ($_POST['remember'] == false){
echo "<div id='divlogin' style='visibility:hidden'></div>";
echo "Div hidden!";
}
"remember" - is a checkbox.
So, if the checkbox is checked then I will activate the cookies and hide the divlogin (till now everything is fine), but if the checkbox isn't checked, I will just hide the divlogin (and this don't happen), however, the echo "Div hidden!" works nicely. The code detects if the checkbox is checked or not, the only problem is that if isn't checked the div doens't hide.
Any ideas? :-\
Thanks