title: INSERT NULL if a field is left blank (decimal) MySQL/PHP
body: <p>I have a if <code>NULL</code> echo "Message" else <code>$value</code>.</p>
  
  <p>There is some JavaScript hiding the input field, so they check it and enter the value.</p>
  
  <p>If they don't check it to enter the field, the db enters 0.00 and doesn't specify <code>NULL</code> so my PHP if statement works.</p>
  
  <p>How do I either set the variable as <code>NULL</code> if its blank, or set <code>NULL</code> in the <code>INSERT</code> statement?</p>
  
  <pre><code>`myTableField` decimal(10,2) default NULL,
  </code></pre>