9 - PHP:MySQL - PreDelete
This is a simple page that asks if you really want to delete the record. If you say yes, it carries out your requeset. If you say no, it returns you to the previous page.
copy from just below this line...
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<?
// Instead of immediately deleting the record, ask the
user to confirm the action first
echo "Do you really want to delete this record?<br>";
// The $id variable came to this page through the URL
we built in the previous page. That value is available
// here. Notice that it gets built into the URL to the page that actually deletes
the record, just as we built it
// into the URL in the previous page.
echo "<a href='php9_sampleDeleteData.php'> No </a> <a href='php9_sampleDelete.php?id="
. $id . "'> yes </a>";
?>
</body>
</html>
... to just above this line.