[PHP3] MySQL entry removal From: Tyler Longren (tyler.longren <email protected>)
Date: 04/30/00

I'm having a problem having the correct message displayed if the user is successfully deleted or if the user isn't successfully deleted. Here's my code:

<?
$db = mysql_connect("localhost","root","password") or die ("Unable to connect to MySQL server.");
mysql_select_db(secretDB) or die ("Unable to select requested database.");
$deleteresult = mysql_query ("DELETE FROM users
                                            WHERE real_name = '$real_name'
                                            AND username = '$username'
                                            ");
if (!$deleteresult)
{
print "User not sucessfully deleted, sorry.";
}
elseif ($deleteresult)
{
print "User <b>$username</b> sucessfully deleted.";
}
mysql_close($db);
?>

Can anybody help me out here? I had this problem once and was able to fix it, but I don't remember what I did. Thanks!

Tyler Longren