title: Updating session variables
body: <p>So in a separate php file I write the amount of points the user has and other information like email from a database into a PHP session:</p>
  
  <pre><code>// write user data into PHP SESSION
  $_SESSION['user_name']         = $result_row-&gt;user_name;
  $_SESSION['user_email']        = $result_row-&gt;user_email;
  $_SESSION['user_login_status'] = 1;
  $_SESSION['user_Points']       = $result_row-&gt;user_Points;
  </code></pre>
  
  <p>Next, I have a separate php file when the user logs in to show the amount of points he has:</p>
  
  <pre><code>// The amount of points the user has
  Hey, you currently have 
  &lt;?php echo $_SESSION['user_Points'];?&gt;        
  </code></pre>
  
  <p>It works fine, but when I update the amount of points in phpmyadmin the user has, the only way to refresh the points count is to log-out and log-in back again. I know that the session sets the variables only one time, but I want to ask if there's a way to update the points without logging out and logging in again like: refreshing the page, using JavaScript or other ways. Thank you in advance :)</p>