Re: sessions and my class...
| From: | Dallas Kropka | Date: | Fri, 01 Dec 2000 15:11:05 +0000 |
| Subject: | Re: sessions and my class... | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-28139@lists.php.net to get a copy of this message | ||
NOTE TO LIST:
When I look at the session file after the first login attempt, the file is
empty, but after the second attempt, the file is full.
----- Original Message -----
From: "Dallas Kropka" <dallask@firstworld.net>
To: "PHP LIST" <php-general@lists.php.net>
Sent: Friday, December 01, 2000 6:44 AM
Subject: [PHP] sessions and my class...
Here is the problem
I have a form --> user enters a login name
the login name goes to another script for processing
there a session is started and the class is registered
session_start();
session_register('classname');
and actions are taken on the login name... if it is good then a variable
(valid) is set to 1 in the class and the code redirects to another
script....
header("Location: other_script.php4")
in that script the session is checked for....
session_start();
session_register('classname');
and the code checks for the login veriable.
if(!$classname->valid)
{
##send to login
}
This keeps people from comming back to the page without logging in.
what is happening is that the variable is not being found even though it is
being set in the class, so the user is redirected back to the login
screen...
HERES THE FUN PART..... When the user enters his login name again.... the
script works, the variables are set, and the class is registered. What am I
doing wrong? If anyone needs to look at more of my code Ill send it, but
this is all it does... is there some problem with using sessions and
headers? is my PHP install Pooched? Please help.
Dallas K.