title: Alert before deleting data from Mysql
body: <p>I want an alert to display to make sure the user will double confirm if they want to delete the data. </p>
  
  <pre><code>&lt;a onclick="return confirm('Are you sure?')" href="del.php?masId=&lt;?php echo $row['masId'] ?&gt;" &gt;delete&lt;/a&gt;
  </code></pre>
  
  <p>My php code: </p>
  
  <pre><code>$masId = $_GET['masId'];
  
  $res=$MySQLiconn-&gt;query("Delete FROM masinflation WHERE masId=".$masId);
  </code></pre>
  
  <p>However, the data still will be removed even I click cancel. </p>