title: recording username into table from session with mysql and php
body: <p>I have a database system developed in mysql and php, with a login system as well, im using sessions,however when a user adds a record I want it to also record the user who added it, im thinking sessions would allow me to do this but im lost interms of how to retrieve the username from the session and add it to a table: example of a simple insert:</p>
  
  <pre><code>INSERT INTO table_name
  VALUES (value1, value2, value3) 
  </code></pre>
  
  <p>I want value 3 to be the username from the sessions, I am not sure how much more information  you need to help me to solve this, so ask as you see fit</p>