I want to delete a record in my database and im doing it by sending an id from one page deletelist.php to delete.php
so when a link delete.php?phoneid=2 is clicked the following code is run in delete.php
<?php
if (is_numeric($_GET['phoneid'])) {
require('conn.php');
$q = "DELETE * FROM phones WHERE phoneid = {$_GET['phoneid']}";
$r = mysql_query ($q);
echo '<p>Phone Removed</p>';
mysql_close();
} else {
echo '<p>An Error Occured</p>';
}
?>
but when it runs everything seems to be fine but when i go to check the database the record is still there... :S
confusing!
Can anyone help?
Chris