title: Php form processing script not submitting to db or displaying any errors why
body: <p>I am using the following script to process a php form on my website, when I hit submit on the form the script below is then supposed to save the data to the db. The problem I am having is that its not saving any of the data to the mysql database, but its also not throwing any errors on why its not either ! ?.</p>
  
  <pre><code>    &lt;link href='template/css/admin.css' rel='stylesheet' type='text/css'&gt;
      &lt;?php
      if (isset($_POST['customerID'])) {$customerID = $_POST['customerID'];}else {$customerID = '';}
      if (isset($_POST['datecreated'])) {$datecreated = $_POST['datecreated'];}else {$datecreated = '';}
      if (isset($_POST['name'])) {$name = $_POST['name'];}else {$name = '';}
      if (isset($_POST['facebookuserurl'])) {$facebookuserurl = $_POST['facebookuserurl'];}else {$facebookuserurl = '';}
      if (isset($_POST['tel'])) {$tel = $_POST['tel'];}else {$tel = '';}
      if (isset($_POST['email'])) {$email = $_POST['email'];}else {$email = '';}
      if (isset($_POST['address'])) {$address = $_POST['address'];}else {$address = '';}
      if (isset($_POST['itemforrepair'])) {$itemforrepair = $_POST['itemforrepair'];}else {$itemforrepair = '';}
      if (isset($_POST['repairdetails'])) {$repairdetails = $_POST['repairdetails'];}else {$repairdetails = '';}
      if (isset($_POST['otherdetails'])) {$otherdetails = $_POST['otherdetails'];}else {$otherdetails = '';}
      if (isset($_POST['itemnumber'])) {$itemnumber = $_POST['itemnumber'];}else {$itemnumber = '';}
      if (isset($_POST['pricequoted'])) {$pricequoted = $_POST['pricequoted'];}else {$pricequoted = '';}
      if (isset($_POST['partprice'])) {$partprice = $_POST['partprice'];}else {$partprice = '';}
      $profit = $pricequoted - $partprice;
      if (isset($_POST['datepartordered'])) {$datepartorderedpre = $_POST['datepartordered'];$date = DateTime::createFromFormat("D F d, Y", $datepartorderedpre);$datepartordered = date('Y-m-d',strtotime($datepartorderedpre));}else {$datepartorderedpre = ''; $datepartordered = '';}
      if (isset($_POST['jobstatus'])) {$jobstatus = $_POST['jobstatus'];}else {$jobstatus = '';}
      if (isset($_POST['dateofcompletion'])) {$dateofcompletionpre = $_POST['dateofcompletion'];$date = DateTime::createFromFormat("D F d, Y", $dateofcompletionpre);$dateofcompletion = date('Y-m-d',strtotime($dateofcompletionpre));}else {$dateofcompletionpre = ''; $dateofcompletion = '';}
  
  
  
      // Checks to see if the key value is set
      if (isset($_GET['key'])) {$key = $_GET['key'];} else {$key = '';}
  
      // Checks to see if the key value is valid to authenticate the user
      if ($key == 'mysecretkey'){
      // If the key value is correct the user is granted access
  
      include("connectmysqli.php"); 
  
      $stmt = $db-&gt;prepare("UPDATE `jobdetails` SET  itemnumber='$itemnumber',datecreated='$datecreated',customerID='$customerID',name='$name',facebookuserurl='$facebookuserurl',tel='$tel',email='$email',address='$address',itemforrepair='$itemforrepair',repairdetails='$repairdetails',otherdetails='$otherdetails',pricequoted='$pricequoted',partprice='$partprice',profit='$profit',datepartordered='$datepartordered',jobstatus='$jobstatus',dateofcompletion='$dateofcompletion' WHERE customerID='$customerID'");
      $stmt-&gt;execute(); 
      if (!$stmt)
          echo $db-&gt;error . "\n";
      $stmt-&gt;close();
  
  
      header('Location: jobsmanager.php?&amp;key='.$key);
      }
      else {
      // Denies the user access if the key value isnt correct 
      echo '&lt;h1&gt;Access Denied !&lt;/h1&gt;';}
      ?&gt;
  </code></pre>