RE: [PHP] Script Debug.
| From: | Matt Schroebel | Date: | Thu, 07 Mar 2002 15:02:54 +0000 |
| Subject: | RE: [PHP] Script Debug. | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-87632@lists.php.net to get a copy of this message | ||
Could be several things ...
> else {
> session_register("user_auth_level");
> $auth_select = "select account_admin_level from account_details where
> username='$login_username'";
Perhaps echo the sql statement here so you can see what you're trying to do.
> $run_auth_select = mysql_query($auth_select);
Check if the query was successful here. Success meaning the statement was valid; not that you got a
result. If it's not successful, then there's something wrong with the sql statement.
> $run_auth_select_results = mysql_fetch_row($run_auth_select);
Check here if you have a row before accessing the dataset below. If you don't then take some
error handling action such as redisplaying login with a message that the user wasn't found.
>
> $user_auth_level = $run_auth_select_results[0];
>
> ?>