title: How to insert NULL Value in PHP
body: <p>I want to insert NULL Value in Database</p>
  
  <pre><code>$managerId = $_POST['managerId'];
  
  if($managerId == 0)
  {
      $managerId = NULL;
  }
  else
  {
      $managerId = 14;
  }
  $mysql_user_resultset = mysqli_query($con, "INSERT into user (managerId) VALUES ('$managerId')");
  </code></pre>
  
  <p>I am using like this. Its not working, Value doesn't insert.</p>
  
  <p>How to insert both Null value and some value in Same variable..   </p>
  
  <p>Its Because of '$managerId' - single quotation.</p>
  
  <p>How to define for both the types</p>