Hi,
I want to add message to ask "Are you sure you want to delete this record? Yes or No" When they click on yes it removes the record from the database and a confirmation message "Your record has been deleted. "
This is the code without the confirmations I have so far:
<?php
include("../Connections/conn.php");
// Delete all publications belonging to the author
// along with the entry for the author.
$id = $_GET['id'];
$ok1 = @mysql_query("DELETE FROM pub WHERE authorid='$id'");
$ok2 = @mysql_query("DELETE FROM author WHERE id='$id'");
if ($ok1 and $ok2) {
echo '<h3>Author deleted successfully!</h3>';
} else {
echo '<p>Error deleting author from database!<br />'.
'Error: ' . mysql_error() . '</p>';
}
?>
Any help would be appreciated.