title: how to use session ids for authentication purpose
body: <p>I am using just session variables <code>$_SESSION['user_id']</code> and <code>$_SESSION['passwd']</code> to store the id and password of user once when he logs in. </p>
  
  <p>I am just checking these two variables with database each time the user moves to a new php page for authentication. Actually I didnt know about <code>session_id()</code> . </p>
  
  <p>I dont think what i am doing for authentication is the right way. I feel that there is something to be done with <code>session_id</code> for security stuff. </p>
  
  <p>and one more doubt- can these session variables be easily hacked when I use the session variables by the way i mentioned</p>
  
  <p>What should I do?</p>