MySQL Forums
Forum List  »  PHP

Re: Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in D:....
Posted by: putraikim_n9 den
Date: January 02, 2006 10:00PM

hello... i need your help..
i have create web and uploaded already but i get error occur when i trying access other page from
login page.. for your information i use the correct username(bio_notentera) & password(bio_pass)..
what should i do? what the problem?...

<<sample code>>

<? session_start();

if (isset($HTTP_POST_VARS['bio_notentera']) && isset($HTTP_POST_VARS['bio_pass']))
{
// if the user has just tried to log on
$bio_notentera = $HTTP_POST_VARS['bio_notentera'];
$bio_pass = $HTTP_POST_VARS['bio_pass'];

include 'dbase.php';

$query = "SELECT * FROM biodata
WHERE bio_notentera = '$bio_notentera'
AND bio_pass = '$bio_pass' ";

$result = mysql_db_query($db,$query);

if ( mysql_num_rows($result) > 0 ) <<-- this is my problem
{
// if they are in the database register the user id
$HTTP_SESSION_VARS['valid_admin'] = $bio_notentera;
}

if ( isset($HTTP_SESSION_VARS['valid_admin']))
{
echo "<script language='Javascript'>
location.href='maklumat_diri4.php?bio_notentera=$bio_notentera';
</script>";
}

}
?>

Options: ReplyQuote


Subject
Written By
Posted
Re: Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in D:....
January 02, 2006 10:00PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.