title: update database when click on submit button
body: <p>Hi I'm new to php and I have searched through in stackoverflow for answers but non prevail.
  My question is how to update database using the submit button. below is my code for submit button.</p>
  
  <pre><code>&lt;?php
  if (isset($_POST['action'])) {
  $sql="UPDATE leaveapp SET status = Approve WHERE leaveappid = '13'";
          }               
  ?&gt;
  &lt;form action="approve.php" method="post"&gt;
  &lt;input type="submit" id='approve' value="Yes" name="action" class="approve" /&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>the submit button was suppose to update table leaveapp and set status to approve where the leaveappid is = 13 but whenever I click on the submit button, It did not update the database.</p>