title: How to destroy php session without log out
body: <p>Here is the code I'm using to log in a user : </p>
  
  <pre><code>    if($username==$db_username&amp;&amp;$password==$db_password)
      {
          session_start();
          echo 1;
          header("Location: index2.php");
          $_SESSION['username']=$db_username;
  </code></pre>
  
  <p>Now, this is supposed to assign a session to the username who has logged in. In my application, I don't have a log out option so I go to the log in page and send another username and password. So when these new information are sent, the old session must be destroyed and a new session to the new user should be assigned. Can I do that ?</p>