title: passing a null value to mysql database
body: <p>A user fills out a form and if they choose to not fill out a field that is not required php does this:</p>
  
  <pre><code>      if($_SESSION['numofchildren']=="")
           $_SESSION['numofchildren']=null;
  </code></pre>
  
  <p>But when I use the session variable in a mysql query, the result is not null, but is 0. The column is a tinyint(4) that allows NULL.</p>
  
  <p>Why am I getting a 0 instead of NULL?</p>