Re: $_SESSION troubles
| From: | Michiel Lange | Date: | Fri, 05 Jul 2002 15:04:14 +0000 |
| Subject: | Re: $_SESSION troubles | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-105671@lists.php.net to get a copy of this message | ||
oww... should have added a few things as information...
It's friday and one tends to forget such things then...
I'm on Slackware 8.1, PHP 4.2.1, Apache 1.3.24
maybe that helps a bit...
"Michiel Lange" <mil@actuera.nl> schreef in bericht
news:20020705131324.21213.qmail@pb1.pair.com...
> Hello hello,
>
> I have this strange thing with a sort of login procedure (still working it
> out, but it will work eventually)
> On the first page, you log in (username + password)
> Then we come to 'login.php' where I have this header
> 1 <?php
> 2 session_start();
> 3 $loginname=$_POST["loginname"];
> 4 $loginpw=$_POST["loginpw"];
> 5 session_register('loginname');
> 6 session_register('loginpw');
> 7 ?>
>
> This works, I can use $loginname and $loginpw
>
> Somewhere on that page I have added a few buttons, and one of those
buttons
> is functional (the others have to be written yet)
> But here I have this header:
> 1 <?php
> 2 session_start();
> 3 $loginname=$_SESSION['loginname'];
> 4 $loginpw=$_SESSION['loginpw'];
> 5 /* session_register('loginname');
> 6 session_register('loginpw'); -- commented out, it did not
> add something seemingly */
> 7 ?>
>
> The strange thing is that if I do (hey, it's just for testing what's
> happening):
> print("loginname = $loginname<br>\n");
> print("loginpw=$loginpw<br>\n");
>
> both loginname and loginpw contain the same information, which is the true
> information of $loginpw
> what am I doing wrong here?
>
>