hostingen
09-27-2005, 10:04 PM
$db = mysql_connect("localhost", "user", "password" );
mysql_select_db("vpanel", $db);
$query = 'select * from clientdb'
."where name ='$userid'"
." and pass='$password'";
$result = mysql_query($query);
$num_rows = mysql_num_rows($result);
echo $num_rows;
if(num_rows> 0){
$HTTP_SESSION_VARS['valid_user'] = $userid;
}
What is wrong with this fragment? I got some warning like :
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource
I am using php4
mysql_select_db("vpanel", $db);
$query = 'select * from clientdb'
."where name ='$userid'"
." and pass='$password'";
$result = mysql_query($query);
$num_rows = mysql_num_rows($result);
echo $num_rows;
if(num_rows> 0){
$HTTP_SESSION_VARS['valid_user'] = $userid;
}
What is wrong with this fragment? I got some warning like :
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource
I am using php4
