:) Tried that: Warning: Supplied argument is not a valid MySQL result resource in /.../testals.php on line 189 189> if (mysql_num_rows($news) == 1) John
> Matt> mysql_num_rows($news) $server = "localhost"; $user = "****"; $pass = "****"; $db = "redwards"; $table = "testals"; $myconnection = mysql_connect($server,$user,$pass); mysql_select_db($db,$myconnection); $news = mysql_query("select StudentId from $table where StudentID = $StudentID"); if (mysql_num_rows($news) == 1) include ("./html/access_error.htm"); else include ("./html/registration.htm"); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php