Lysine
15-07-2006, 11:51 AM
What is wrong with this code?
<?
ob_start();
$conn = mysql_connect("localhost","hablaugh_staff","********");
mysql_select_db(hablaugh_staff) or die(mysql_error());
$logged = mysql_query("SELECT * FROM dj WHERE ip = '$ip'");
$logged = mysql_fetch_array($logged);
if ($logged[suspended] == 1) {
die ("Your account has been suspended, please contact management.
<br />
<br />
<a href=\"logout.php\">Logout</a>");
}
?>
and it shows the error
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/hablaugh/public_html/DJPANEL/protect.php on line 6
If you can help + rep.
<?
ob_start();
$conn = mysql_connect("localhost","hablaugh_staff","********");
mysql_select_db(hablaugh_staff) or die(mysql_error());
$logged = mysql_query("SELECT * FROM dj WHERE ip = '$ip'");
$logged = mysql_fetch_array($logged);
if ($logged[suspended] == 1) {
die ("Your account has been suspended, please contact management.
<br />
<br />
<a href=\"logout.php\">Logout</a>");
}
?>
and it shows the error
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/hablaugh/public_html/DJPANEL/protect.php on line 6
If you can help + rep.