$user = mysql_real_escape_string($txtusername);
$pwd = mysql_real_escape_string($txtpassword);
$strsql = "Select * from accnts Where username = '$user' and password = '$pwd'";
$result = fetchAll($strsql);
$no = fetchNoofRows($result);
if($no <= 0)
{
redirect("index.php?p=login&msg=false");
}
else
{
$rs = mysql_fetch_object($result);
$sql=mysql_query("select * from accnts where id=$rs->userid");
$sqlr=mysql_fetch_object($sql);
var_dump($rs);
var_dump($sqlr);
var_dump($sql);
i got an error of Warning: mysql_fetch_object(): supplied argument is not a valid MySQL result resource in account.php on line 20