$_SESSION troubles

From: Date: Fri, 05 Jul 2002 12:26:04 +0000
Subject: $_SESSION troubles
Groups: php.general 
Request: Send a blank email to php-general+get-105647@lists.php.net to get a copy of this message
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?

« previous php.general (#105647) next »