Fw: [PHP] help needed with session variables
| From: | Sascha Braun | Date: | Tue, 28 Jan 2003 14:14:49 +0000 |
| Subject: | Fw: [PHP] help needed with session variables | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-133365@lists.php.net to get a copy of this message | ||
Isnt it better to do it in this way?
session_start();
session_register('USER');
$USER['valid'] = true;
$USER['firstname'] = $first_name;
$USER['lastname'] = $last_name;
Then I really know what I am doing!
Good luck
Sascha
----- Original Message -----
From: "1LT John W. Holmes" <holmes072000@charter.net>
To: "Pushpinder Singh Garcha" <pgarcha@adelphia.net>;
<php-general@lists.php.net>
Sent: Monday, January 27, 2003 11:02 PM
Subject: Re: [PHP] help needed with session variables
> Are you sure $first_name and $last_name have a value? Double check...
>
> ---John Holmes...
>
> ----- Original Message -----
> From: "Pushpinder Singh Garcha" <pgarcha@adelphia.net>
> To: <php-general@lists.php.net>
> Sent: Monday, January 27, 2003 4:44 PM
> Subject: [PHP] help needed with session variables
>
>
> hello,
>
> I am making use of sessions in my PHp/MySQL Database application. When
> the user is successfully authenticated against the database, a session
> is created in following manner:
>
>
> session_register("valid_user","firstname","lastname");
>
> $valid_user = $login;
> $firstname = $first_name;
> $lastname = $last_name;
>
> While I am able to use the $valid_user variable all thru the sesion ,
> when I try to use the $valid_user it works fine (i.e. I am able to
> access the value) throughout the session, however when I try to use the
> other two registered session variables i.e firstname and lastname, I
> am not able to extract the value. Can you suggest what might be going
> wrong. Note I am locally testing the setup on my Mac.
>
> Many Thanks
> Pushpinder Singh Garcha
> _________________________________
> Web Architect
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>