Hello all.. Iam a novice so fully expect that I have buggered up big time..
I am attempting add a function that will delete a row, (which is actually a message, and I want to allow the user to clean up the messages.)
each message has a unique number in the database this is named MNumber. I have a radio button against all the message and the unique number is transfered to the next page using a metod POST.
I then (as a test for the correct information) list the data in the data base using the following query
$sql = "SELECT * FROM Register
WHERE MNumber=$ireply";
All the date that is relavent to the unique number is displayed. So I am delighted.
I then want to give the user the option to delete the message and have written the following that doesn't work.
echo "<form action='New_member.php' method='POST'>\n";
echo "<input type='radio' name='Remove' value='DEL'>Delete";
echo "<br>\n";
echo "<input type='submit' value='select type'>
</form>\n";
if ($_POST['Remove'] == "DEL")
{
$sql = "DELETE FROM Register WHERE MNumber= $ireply";
mysql_query($sql)
or die("Couldn't execute");
}
?>
If you can help I would appreciate it..