[SOLVED] Resource id #9
Posted: Wed Jul 07, 2004 3:51 pm
I made a login where users enter their email and password, then i need the username to be returned, i expected $query to do that at the end there, but instead i get "Resource id #9" any ideas?
Thanks!
~FCB
Code: Select all
<?php
function login($email,$pass)
{
$conn = db_conn();
if (!$conn)
{
return false;
}
else
{
$pass1 = crypt($pass,'ezp');
$query = mysql_query("select name from users where email = '$email' and pass = '$pass1'");
if (!mysql_num_rows($query)>0)
{
return 'Error: Login Failure';
}
else
{
return $query;
}
}
}
?>~FCB