RE: [PHP] registering a session variable from a select * query.
| From: | Non-HP-UnitedKingdom,ex2) | Date: | Wed, 06 Mar 2002 17:37:05 +0000 |
| Subject: | RE: [PHP] registering a session variable from a select * query. | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-87495@lists.php.net to get a copy of this message | ||
Any updates / takers on this problem ??
thanks,
Matt.
-----Original Message-----
From: DARCY,MATTHEW (Non-HP-UnitedKingdom,ex2)
[mailto:matthew_darcy@non.hp.com]
Sent: Wednesday, March 06, 2002 3:04 PM
To: 'php-general@lists.php.net'
Subject: [PHP] registering a session variable from a select * query.
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.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php