Hi there,
I'm having problems deleting a row from my database. With the query I have I can delete everything in my table, but what I need is to only delete the row that has the checkbox ticked! My PHP code is below, can someone please have a look at it and let me know how to delete just one row??
<?php
$noupdates=0;
include("dbconnect.php");
$email=$_GET['pending'];
$query = "DELETE FROM members WHERE pending=" .$email;
$result = @ mysql_query($query);
if (!$result) {
$message="problem with members table";
echo "<a href='../approve.php'><h2>Back to Approve page</h2></a>";
die($message);
}
if (mysql_affected_rows()==0){
echo "Failed update: ".$email."<br />";
echo "<a href='../approve.php'><h2>Back to Approve page</h2></a>";
} else {
header("location:../approve.php");
}
?>
Cheers
