title: PDO insert not adding records to database table
body: <p>For some reason, the first SQL works (the UPDATE) but the second INSERT part does nothing and puts nothing into my new points table I just created. The Points table is simple with just these columns: ID, SID, WID, PID. Any idea why no data will populate it/no rows inserted? </p>
  
  <pre><code>if(isset($_POST ['yes'])){
  
  // Get values from form 
  $yes_WID = $_POST['yes'];
  
  $yesupdate = "UPDATE writing SET approved = :approved, position = :position
  WHERE WID = :WID";
  $stmt2 = $dbh-&gt;prepare($yesupdate);
  $stmt2-&gt;bindParam(':WID', $yes_WID, PDO::PARAM_INT);        
  $stmt2-&gt;bindParam(':approved', $e = Y, PDO::PARAM_STR);   
  $stmt2-&gt;bindParam(':position', $row2[0]['position'], PDO::PARAM_INT);                                        
  $stmt2-&gt;execute();
  
  
  $storyauthor = $row[0]['stories.ID'];
  $contpoint = 3;
  $contauthor = $row2[0]['writing.ID'];
  
  $yesupdate2 = "INSERT INTO points(ID, 
  SID,
  WID,
  PID) VALUES(
  :ID,
  :SID,
  :WID,
  :PID)";
  $stmt9 = $dbh-&gt;prepare($yesupdate2);
  $stmt9-&gt;bindParam(':ID', $contauthor, PDO::PARAM_INT);      
  $stmt9-&gt;bindParam(':SID', $the_SID, PDO::PARAM_INT);        
  $stmt9-&gt;bindParam(':WID', $yes_WID, PDO::PARAM_INT);        
  $stmt9-&gt;bindParam(':PID', $contpoint, PDO::PARAM_INT);        
  $stmt9-&gt;execute();
  </code></pre>