title: SessionIDs are not unique in PHP
body: <p>I'm learning on how to do session management on PHP and trying to allow only one login session by using <code>session_id()</code> to generate login session hash, but it seems that something is wrong, because each time i call out <code>session_id()</code> i will be returned the same hash <code>0b055b4f53310060d84535ee8e3bf663</code>. I tried logging in with multiple users, it's returning same hash for each login session and for each user.</p>
  
  <pre><code>//Login.php:
  session_start(); // Starting Session
  //Take inputs, do user query
  if (queryResultRows == 1){
      $_SESSION['userid']=$userinfo["uid"];
      $_SESSION['userlevel']=$userinfo["userlevel"];
      $_SESSION['login_user']=$username; // Initializing Session
      $sessionid = session_id();
      //Insert sessionId into DB..
      //Redirect to next page.
  }
  //Logout.php:
  session_start();
  if(session_destroy()) // Destroying All Sessions
  {
      header("Location: index.php"); // Redirecting To Home Page
  }
  </code></pre>
  
  <p>Now i tried to do login, i successfully had access to all session restricted areas on my page (session was created and is working) then initated logout.php, the session was destroyed, i had no longer access, did login again, but the <code>session_id()</code> value was still the same. Any ideas what i'm doing wrong here?</p>