title: Having a hard time inserting values into mysql using PHP's PDO
body: <p>I am having a hard time inserting data into my database, I created all the fields and made sure they are spelled correctly, I also made sure all the values are in the variable names I am trying to insert into the database, I am not sure what I am doing wrong, here is my code.</p>
  
  <p>DB Script</p>
  
  <pre><code>//This script provides connection to the database//
  //Connect
  $user="root";
  $pass="";
  try {
      $connection = new PDO('mysql:host=localhost;dbname=forms', $user, $pass);
  } catch (Exception $e) {
      print "Error!: " . $e-&gt;getMessage() . "&lt;br/&gt;";
  die();
  }
  </code></pre>
  
  <p>Insert Data into Database Script</p>
  
  <pre><code>try {
          //Prepare
          $prepIt = $connection-&gt;prepare(
          "INSERT INTO `formdata`(`revision`, `printOnly`, `artOnly`, `sales`, `service`, `fBoth`, `clientRep`, `dealerName`, `clientContact`, `clientCell`, `clientEmail`, `orderDate`, `jobName`, `coOp`, `dateDrop1`, `dateDrop2`, `qty1`, `qty2`, `dateDrop1Exp`, `dateDrop2Exp`, `jobDesc`, `otherDesc`, `envelopes`, `otherEnvelope`, `scratcher`, `fInsert`, `fKey`, `kbbAppend`, `matchJob`, `4x6Note`, `postItNote`, `creditCard`, `busCard`, `bbAppend`, `font`, `fReal`, `preSort1Class`, `firstClassStamp`, `preSortStandard`, `canceledStamp`, `databaseEquity`, `dataDatabase`, `dataBk`, `dataCredit`, `dataOsBrand`, `dataOsNoBrand`, `dataSaturation`, `dataOther`, `dGiveaway`, `genGiveaway`, `inQuant1`, `inQuant2`, `inQuant3`, `inQuant4`, `inDesc1`, `inDesc2`, `inDesc3`, `inDesc4`, `inPricePc1`, `inPricePc2`, `inPricePc3`, `inPricePc4`, `total1`, `total2`, `total3`, `total4`, `recQuant1`, `recQuant2`, `recQuant3`, `recDesc1`, `recDesc2`, `recDesc3`, `recPerRecord1`, `recPerRecord2`, `recPerRecord3`, `recListTotal1`, `recListTotal2`, `recListTotal3`, `formComments`) VALUES ($revision, $printOnly, $artOnly, $sales, $service, $both, $clientRep, $dealerName, $clientContact, $clientCell, $clientEmail, $orderDate, $jobName, $coOp, $dateDrop1, 
              $dateDrop2, $qty1, $qty2, $dateDrop1Exp, $dateDrop2Exp, $jobDesc, $otherDesc, $envelopes, $otherEnvelope, $scratcher, $insert, $key, $kbbAppend, $matchJob, $_4x6Note, $postItNote, $creditCard, $busCard,
              $bbAppend, $font, $real, $preSort1Class, $firstClassStamp, $preSortStandard, $canceledStamp, $databaseEquity, $dataDatabase, $dataBk, $dataCredit, $dataOsBrand, $dataOsNoBrand, $dataSaturation, $dataOther,
              $dealerGiveaway, $genericGiveaway, $inQuant1, $inQuant2, $inQuant3, $inQuant4, $inDesc1, $inDesc2, $inDesc3, $inDesc4, $inPricePc1, $inPricePc2, $inPricePc3, $inPricePc4, $total1, $total2, $total3, $total4,
              $recQuant1, $recQuant2, $recQuant3, $recDesc1, $recDesc2, $recDesc3, $recPerRecord1, $recPerRecord2, $recPerRecord3, $recListTotal1, $recListTotal2,$recListTotal3, $comments)");
              //Execute
              $prepIt-&gt;execute();
              //Confirmation
              echo "Job Has Been Created";
  
      } catch (Exception $e) {
          //Catch any errors
          echo "there was an error.".$e-&gt;getMessage();
      }
  </code></pre>