title: Inserting into MySQL database
body: <p>I am trying to insert data into MySQL database. For each of the data been inserted I want the username to be added so as to keep track of the user the insert that data.Here is my sample query below but the username is not inserting. </p>
  
  <pre><code>$username = $_SESSION['log']['username'];
  
  $Query = "INSERT INTO core_modules 
            (username,courseID,title,credits) 
             VALUES ('$username',SELECT ID,title,credits FROM module 
                 WHERE ID IN ('CS4150','CS4403','CS4407','CS4501','CS4504','CS4614'))";
  mysql_query($Query);
  echo $Query. '&lt;br /&gt;'; 
  </code></pre>
  
  <p>This is what my database looks like and I need the username inserted into each record inserted.</p>
  
  <p><img src="https://i.stack.imgur.com/akHTz.png" alt="enter image description here"></p>
  
  <p>How could I go about this please ??  Thanks in advance.</p>