if(isset($_SESSION['admin']) == TRUE){echo "<font face='tahoma' color='#ff0000'>ADMIN : ".$_SESSION['admin']." welcome<br></font>";}
$sql="SELECT * FROM messages WHERE messages.user_id=" .$_SESSION['userid']. ";";
$result=mysql_query($sql);
$numrows=mysql_num_rows($result);
for the previous code the browser show me this message:
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/www/e3lan3.freehostia.com/header.php on line 9
and line 9 is the line colored red in the code .. what's the problem here ?
is a newer version of php doesn't support this (mysql_num_rows()) function ?
if so what's the alternative
thanx all
your friend from Egypt