How can I check $result so I can register a valid_user after the user has been added to database?? This is what I've done and it isn't right. Any suggestions would be appreciated!!
$sql = "INSERT INTO auth values ('$userid', password('$password'))";
$result = mysql_query($sql) or die ('Error: ' . mysql_error() . '<br>Query: ' . $sql);
if (mysql_num_rows($result) >0 )
{
// if they are in the database register the user id
$valid_user = $userid;
session_register("valid_user");
}
}