I'm working on a project, and one part of it is not working. This part is supposed to simply delete a record from a table. The code is as follows:
<?
$user = "xxxxxxxxx";
$pass = "xxxxxxxx";
$db = "music";
$connection = mysql_connect($server, $user, $pass) or die ("Unable to connect to database.");
$query = "delete from posts where login = '$login' ";
$result = mysql_db_query($db,$query ,$connection);
mysql_close ($connection);
echo "RECORD WAS DELETED";
?>
======================
The result of the above is RECORD WAS DELETED without any error messages. But when I check the table, the record is still there.
Note: $login is a variable supplied from a form earlier in the script. Any ideas?
Richie.