Jump to content

migi0027

New Members
  • Posts

    3
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

migi0027's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Thank you so mouch, see, i knew i had done something stupid! (Added start session)
  2. I know that , but when i call the logout function and then call the check login, it still returns true.
  3. <?php function Login() { session_start(); $_SESSION["loggedin"] = true; echo "You are logged in!"; header("Location: ../L_index.php"); //Aka Logged in Index. } function Logout() { $_SESSION["loggedin"] = false; session_destroy(); } function checklogin() { session_start(); if ($_SESSION["loggedin"] == true) { return true; } else { return false; } } ?> This is just a tiny bit of my code, there is security holes, but as you see, there is 3 functions: Login Logout Checklogin But when i use the Login function, everything is fine, but if i then use the checklogin, then it always returns true(it returns true after i used the logout function), why?
×
×
  • 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.