I'm asking the user to login to the site. When they login for the first time, I add them to the auth table. Now I want to register the userid. I'm having trouble with my $result variable - I've tried to echo it to no avail. How can I find our what is in $result and/or how can I register the new user?
$sql = "INSERT INTO auth values ('$userid', password('$password'))";
$result = mysql_query($sql) or die ('Error: ' . mysql_error() . '<br>Query: ' . $sql);
echo $result;
if (mysql_num_rows($result) >0 )
{
// if they are in the database register the user id
$valid_user = $userid;
session_register("valid_user");
}
}