Code: Select all
<?PHP
if($usr!=""){
$username="******";
$password="******";
$database="******";
$dbconnect=mysql_connect(localhost,$username,$password);
@mysql_select_db($database) or die( "Unable to select database");
$ranksql = "SELECT `rank` FROM `phpbb_users` WHERE `username` = '$usr' LIMIT 1";
$rank = mysql_result(mysql_query($ranksql), 0,0); //line 9
echo $rank;
}
else{
echo "crap.";
}
?>Line 9: $rank = mysql_result(mysql_query($ranksql), 0,0);Warning: mysql_result(): supplied argument is not a valid MySQL result resource in /home/gamegate/public_html/getrank.php on line 9
I have no idea why this is happening.. i copied it almost exactly from my other script (for my other site) which works, and it doesnt work on this one
at first it wouldnt connect, but then i fixed that, and now this is happening..
thanks for any help