Re: SESSION VARIABLES
| From: | Adam Bregenzer | Date: | Tue, 10 Feb 2004 05:50:43 +0000 |
| Subject: | Re: SESSION VARIABLES | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-177253@lists.php.net to get a copy of this message | ||
On Tue, 2004-02-10 at 00:43, Ronald Ramos wrote:
> Hi All,
>
> I've created 3 sample scripts, pls see below.
> My problem is that page3.php can't display the value $username and
> $password
> Or is it because it the variables were not importe to that page, that's
> why
> $username and $password has no value? If it is, how can I import it?
You need to have session_start() at the top of the third script as
well. Also you have a typo:
> echo "#password";
should be:
echo "$password";
Consider using $_SESSION[1] instead of session_register[2].
[1] http://www.php.net/reserved.variables#reserved.variables.session
[2] http://www.php.net/session_register
--
Adam Bregenzer
adam@bregenzer.net
http://adam.bregenzer.net/