Here the go where user is log in. I cannot seem to be able to logout when I log in with 'remember me' not active...

```
while($user = $stmt->fetch(PDO::FETCH_ASSOC)) {
        $passwordDB = $user['mypassword'];
        $email = $user['email_address'];
        $userid = $user['user_id'];
    }

 if ($remember_me == "true"){ // Create a Cookie if remember_me is active
      $expire = time()+60*60*24; // Valid for only 1 day
      setcookie("cookie_username", $username, $expire, "/");
      setcookie("cookie_email", $email, $expire, "/");
      setcookie("cookie_userid", $userid, $expire, "/");

     } else if ($remember_me == "false") { // Only create a session if remember_me is not active
                session_start(); // cannot logout if i put it here
                $_SESSION['session_userid'] = $userid;
                $_SESSION['session_username'] = $username;
                $_SESSION['session_email'] = $email;

            } 

```

My php logout code

```
<?php

require_once 'mydatabase.php';

 $_SESSION = array();

 if (ini_get("session.use_cookies")) {

 $params = session_get_cookie_params();
 setcookie(session_name(), '', time() - 86400,
    $params["path"], $params["domain"],
    $params["secure"], $params["httponly"]
  );

 }

 ?>

```

I can properly logout when my 'remember me' checked is on.
**Issue solve:** I accidentally erase my `session_start()` at the top of my logout and forgot to put it back in.