title: Date format for php prepared statement
body: <p>I have set dob as type "date" in my html and in my stu table i am taking it as a string so i have made it as varchar, but null is getting stored as default value</p>
  
  <p>Check the code...</p>
  
  <pre><code> /* Prepared statement, stage 1: prepare */
  if (!($stmt = $mysqli-&gt;prepare("INSERT INTO `stu` (`name`, `gender` , `dob`) VALUES (
  ?, ?, ? ) "))) {
  echo "Prepare failed: (" . $mysqli-&gt;errno . ") " . $mysqli-&gt;error;
  }
  
  /* Prepared statement, stage 2: bind and execute */
  
  if (!$stmt-&gt;bind_param('sss', $name , $gender , $dob )) {
  echo "Binding parameters failed: (" . $stmt-&gt;errno . ") " . $stmt-&gt;error;
  }
  </code></pre>