title: How to insert into database with input type=month?
body: <p>billing.php    </p>
  
  <pre><code>Expiry Date: &lt;input type="month" id="ccexpirydate" name="ccexpirydate" value="&lt;?php echo $row['expirydate'] ?&gt;"/&gt;
  </code></pre>
  
  <p>Firstly, how do I retrieve from database only showing month and year? </p>
  
  <p>dobilling.php</p>
  
  <pre><code>$expiryDate = $_POST['ccexpirydate'];
  
  $query = "INSERT INTO bill (ccexpirydate) VALUES ('" . $expiryDate . "')";
  </code></pre>
  
  <p>Secondly, after editing the expiry date and submitting the form, how to do I update the database with input type=month? Showing only month and year. As currently, my database would show 0000-00-00.</p>