title: How do i insert datepicker into database
body: <p>I need to read the 'month' from table site_salmonusage.
  <a href="https://i.stack.imgur.com/msymt.png" rel="nofollow noreferrer">Here</a> is the example of data in site_salmonusage. Then i need to count whether the data is exist or not, If it exist, then i need to update all data in that 'month'. If not exist, it will insert into.</p>
  
  <pre><code>if ($_POST['register']){
  $entry_id=$_POST["entry_id"];
  $storenum = $_POST["storenum"];
  $store_name=$_POST["store_name"];
  $month = $_POST["month"];
  $usage = $_POST["usage"];
  
  $remove=mysqli_query($con,"SELECT COUNT(*)  As count FROM site_salmonusage WHERE month='$month' AND storenum='$storenum'");
  
  $row=mysqli_fetch_array($remove);
  
  if($row['count']==1){
  
      $add1 = "UPDATE site_salmonusage
  SET  usage='$usage'
  WHERE storenum='$storenum' AND month='$month'";
  } 
  
  else if($row['count']==0){
  $add = "INSERT INTO site_salmonusage (storenum, month, usage)
  VALUES ('$storenum','$month',$usage')";
  }
  else {
      $del= "DELETE  FROM site_salmonusage WHERE month='$month'"; 
      $adding="INSERT INTO site_salmonusage (storenum,month,usage)
      VALUES ('$storenum','$month','$usage')";
  }
  </code></pre>
  
  <p>Here is my php. But after submit button, it not insert into database.</p>