Re: registering a session variable from a select statment.
| From: | Lerp | Date: | Tue, 05 Mar 2002 14:45:34 +0000 |
| Subject: | Re: registering a session variable from a select statment. | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-87268@lists.php.net to get a copy of this message | ||
Ammendment:
You'll have to dump that value (the user's level) into a variable called
user_level first.
HTH Joe :)
"Lerp" <joe@coastaldestination.com> wrote in message
news:20020305144019.88546.qmail@pb1.pair.com...
> Hi there :)
>
> Try something like this:
>
> session register ("user_auth_level");
> $user_auth_level = $user_level;
>
> HTH, Joe :)
>
>
>
>
> "Matthew Darcy" <matthew@darcy.demon.co.uk> wrote in message
> news:MMEDJGDFIEPMBLFAENDBIEOICKAA.matthew@darcy.demon.co.uk...
> > Hi,
> >
> > I have a user auth script. Very simple and works.
> >
> > when I check the username and password I check it against a select all
the
> > values from the user table where the username and password match.
> (inputted
> > from a 2 text boxes)
> >
> > like so
> >
> > file://sets and runs SQL statement that brings back all info on user
which
> > matches us
> > ername and password.
> > $sql_authorisation = "SELECT * FROM account_details WHERE
> > account_name='$login_username' AND
> > account_password=PASSWORD'$login_password')";
> > $sql_authorisation_result = mysql_query($sql_authorisation);
> >
> > I then register 2 session variables $login_username and $login_password
> >
> > I would like to register a session variable from the select * I did
> earlier
> > from the field user_level in the select statment
> >
> > so session register $user_auth_level='user_level'
> >
> > is this the correct way to do this ???
> >
> > Thanks,
> >
> > Matt.
> >
>
>