registering a session variable from a select * query.
| From: | Non-HP-UnitedKingdom,ex2) | Date: | Wed, 06 Mar 2002 15:04:03 +0000 |
| Subject: | registering a session variable from a select * query. | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-87468@lists.php.net to get a copy of this message | ||
hi,
I have been working on updating my user auth section.
to authorise users I
have a simple select * from my_users
if there is a matching row I register the input from a text box (username
and password textboxs)
once I have the username and passsword registered as a sessaion var I want
to do another authorisation - not dependant on a text box but from the
results of the select so I now do.
extra_auth_query="select * from my_users where acount_name
='$login_username' and account_password=PASWORD('$login_pasword')";
run_auth_query=mysql_query($extra_auth_query);
Within the select * I return a column called "auth_level",
I now want to be able to do this
if $auth_level from the select I have just ran =A
register the auth level as a session var
else
echo "you are not allowed in this area get out...."
can anyone help with how to get and register the auth_level
thanks,
Matt.