This means that your sql query probably has an error (or there was some other error that occurred when performing the query).
PHP Code:
// Removed the @ warning suppression.
// If you're in development, you _want_ warnings. Suppressing them will only cause confusion
$result = mysql_query($sql) or die(mysql_error());
$num_rows = mysql_num_rows($result);
Get back to us when you know what the mysql_error() returns.
select from Admin where AdminName='abc' and AdminPassword='box1234'
But the error shows: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'from Admin where AdminName='abc' and AdminPassword='box123