Date: 04/30/00
- Next message: Mark Maggelet: "Re: [PHP3] MySQL/PHP script"
- Previous message: David VanHorn: "[PHP3] Zend Compiler"
- Next in thread: Mark Lo: "Re: [PHP3] MySQL entry removal"
- Reply: Mark Lo: "Re: [PHP3] MySQL entry removal"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
- Next message: Mark Maggelet: "Re: [PHP3] MySQL/PHP script"
- Previous message: David VanHorn: "[PHP3] Zend Compiler"
- Next in thread: Mark Lo: "Re: [PHP3] MySQL entry removal"
- Reply: Mark Lo: "Re: [PHP3] MySQL entry removal"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

