title: Distinguish between two sessions in PHP
body: <p>I tried coding in the following way for one of the website over a localhost. say localhost/abc:</p>
  
  <pre><code>&lt;?php
  session_start();
  $_SESSION['name']=$row['name']
  ?&gt;
  </code></pre>
  
  <p>The output was good. but when the same code was used for another webpage over the same localhost say localhost/xyz. Then there was ambiguity between names. As if I need to distinguish between the sessions for xyz and abc.</p>
  
  <p>So I tried this:</p>
  
  <pre><code>&lt;?php
  session_id(226);
  session_name(veer);
  session_start();
  .
  .
  .//connection with database and all
  .
  $_SESSION['name']=$row['name'];
  echo($_SESSION['name']);
  ?&gt;
  </code></pre>
  
  <p>When another machine logged in over the same server then the session I created was accessible by that machine for same webpage.</p>
  
  <p>Is there any solution. Or how to distinguish between two sessions.?</p>