Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /data/9/0/24/113/676928/user/690291/htdocs/inc/_up_index1.php on line 40
This is the error i get every time when any of my php scripts try to read/write in my mysql data base.
This is _up_index1.php
<?
$test_act['new_tranzaction']="OK";
$test_act['tranzaction_details_started']="OK";
$test_act['tranzaction_details_pointing']="OK";
$test_act['accept_tranzaction']="OK";
$test_act['reject_tranzaction']="OK";
$test_act['tranzaction_details']="OK";
$test_act['payment']="OK";
if(!$test_act[$act]){
$act="tranzactions";
}
if(session_is_registered("valid_user")){
$act=$act;}
else{
$errormsg="";
if($do=="login"){
$sql="select * from escrow_user where user='$user' and pass=PASSWORD('$pass') LIMIT 1";
$result=mysql_query("$sql");
$n=mysql_num_rows($result); /// LINE 40
if($n==0){
$errormsg="Invalid Log In";
$title="LOG IN";
$act="login";}
else{
$rand=mysql_fetch_array($result);
$valid_user=$user;
$valid_email=$rand[email];
session_register("valid_user");
session_register("valid_email");
$title="your account";
$act=$act;}
}
else{$act="login";
$title="LOG IN";
}
}
?>
I am a newbie in php so if anyone can help me fix this website it will be highly apreciate.
thanks