Jump to content

bioshock

New Members
  • Posts

    2
  • Joined

  • Last visited

    Never

Everything posted by bioshock

  1. Hi! I'd already tried that and is the same thing. if ($_POST['remember'] == true) { // COOKIES ON! $tempo = time() + 20000; setcookie(user, $username, $tempo); setcookie(pass, $password, $tempo); header("Location: index.php"); echo "<h1 class='welcome'>Bem vindo ".$_COOKIE['user']." |</h1>"; echo "<div id='divlogin' class='divlogin' style='display:none'></div>"; echo "<a href='logout.php'><h1 class='logout'><b>Logout</b></h1></a>"; // OFF }elseif ($_POST['remember'] == false){ // Dispomos as divs, etc, como desejo. echo "<div id='divlogin' class='divlogin' style='display:none'></div>"; echo "<a href='logout.php'><h1 class='logout'><b>Logout</b></h1></a>"; } Can't you give me an example with a checkbox and hiding divs? Thanks!!
  2. 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
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.