title: PHP / MySQL - update table data with session data
body: <p><strong>How to update table data with data stored in session?</strong></p>
  
  <p>I have following code but it is not working(INSERTING INTO DB not working exactly). Please not that this is just part of the code. Session value are being saved correctly. I have a problem with saving them though. </p>
  
  <p>If I have made silly mistake - apologies - I'm newby. </p>
  
  <pre><code>    $loggedTime = $_SESSION['loggedtime'];
      $thisUser = $_SESSION['usr'];
  
      $result = mysql_query("UPDATE 'admin' SET dt = $loggedTime WHERE $thisuser");
      if($result) {
           echo "success"; 
      } else { 
          echo "no success"; 
      }
  </code></pre>