title: PDO Error - column cannot be null
body: <p>I am trying to run this PHP PDO Query:</p>
  
  <pre><code>$stmt = $pdo_conn-&gt;prepare("INSERT into reseller (company, title, forename, surname, address, phone, email, account, bill_by_email, bill_by_post, bill_by_sms, sms_phone, callplan, linked_customer, upload_invoices, show_itemised_calls, support_tickets, support_tickets_emails) values (:company, :title, :forename, :surname, :address, :phone, :email, :account, :bill_by_email, :bill_by_post, :bill_by_sms, :sms_phone, :callplan, :linked_customer, :upload_invoices, :show_itemised_calls, :support_tickets, :support_tickets_emails) ");
      $stmt-&gt;execute(array(':company' =&gt; ($_POST["company"]), 
      ':title' =&gt; ($_POST["title"]), 
      ':forename' =&gt; ($_POST["forename"]), 
      ':surname' =&gt; ($_POST["surname"]), 
      ':address' =&gt; ($_POST["address"]), 
      ':phone' =&gt; ($_POST["phone"]), 
      ':email' =&gt; ($_POST["email"]), 
      ':account' =&gt; ($_POST["account"]), 
      ':bill_by_email' =&gt; ($_POST["bill_by_email"]), 
      ':bill_by_post' =&gt; ($_POST["bill_by_post"]), 
      ':bill_by_sms' =&gt; ($_POST["bill_by_sms"]), 
      ':sms_phone' =&gt; ($_POST["sms_phone"]), 
      ':callplan' =&gt; ($_POST["callplan"]), 
      ':linked_customer' =&gt; ($_POST["linked_customer"]), 
      ':upload_invoices' =&gt; ($_POST["upload_invoices"]), 
      ':show_itemised_calls' =&gt; ($_POST["show_itemised_calls"]), 
      ':support_tickets' =&gt; ($_POST["support_tickets"]), 
      ':support_tickets_emails' =&gt; ($_POST["support_tickets_emails"]) ));
  </code></pre>
  
  <p>But i receive this error when i have blank fields:</p>
  
  <pre><code>Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'bill_by_post' cannot be null' in /home/integra/public_html/lifeline/reseller/addreseller.php:34 Stack trace: #0 /home/integra/public_html/lifeline/reseller/addreseller.php(34): PDOStatement-&gt;execute(Array) #1 {main} thrown in /home/integra/public_html/lifeline/reseller/addreseller.php on line 34
  </code></pre>
  
  <p>Whats the best way to stop this from happening? Is it better to use <code>bindParam()</code> instead?</p>
  
  <p>Thanks</p>