title: How to insert into session row using pdo
body: <p>I am trying to insert into a session row using pdo prepared statements,but i keep getting an insert in the wrong row.This is my insert statement</p>
  
  <pre><code>if(!isset($errMSG))
      {            
          $stmt = $DB_con-&gt;prepare('UPDATE users_table 
                                       SET   
                                           headerimg=:imgH 
                                     WHERE user_id=:uid');
          $stmt-&gt;bindParam(':imgH',$headerimg);
          $stmt-&gt;bindParam(':uid',$id);
          $user_id=$_SESSION['user_session'];
  </code></pre>
  
  <p>my session is:</p>
  
  <pre><code>$user_id=$_SESSION['user_session'];
  </code></pre>