pass it one value at the time:
session_register("valid_user");
session_register("firstname");
session_register("lastname");
Another recommended method is to use superglobal variable $_SESSION. You
can then simply do:
$_SESSION['valid_user'] = $login;
$_SESSION['firstname'] = $first_name;
$_SESSION['lastname'] = $last_name;
and the three variables will be available on the next pages.
remember to start sessions before hand:
session_start();
--
Maxim Maletsky
[EMAIL PROTECTED]
Pushpinder Singh Garcha <[EMAIL PROTECTED]> wrote... :
> 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