Ok these sessions have got me all confused, I need to have two seperate
sessions one for when a user signs up, to stop them using there back button
and inadvertantly signing up twice. And then one when they login. Both of
them work great as standalone but if say I went and log into my account and
then decide I need another, the sign up page blocks me because I already have
a session running. Here is some code will probably help me explain my system.
if(!$PHPSESSID)
{
$SET=1;
}elseif($PHPSESSID=1)
{
echo"<CENTER>You are already Registered, please click <A HREF='login.php'>here
</A> to login.</CENTER>";
die;
}
if($SET=1)
{
session_start();
session_register("SET");
}
This checks to see if there is a session running, if there is it blocks them
and sends them to the log in page, if there isn`t the rest of my script sets
up the account and then forwards them to the log in screen, so if for any
reason they decide to use there back button they can`t create two accounts by
accident.
Then when they log in I start a session as follows:
session_start();
session_register("UserName","Password");
header ("Location: Http://www.tothemembersarea.com/");
So if I go to my system log in and then try to setup a new account it blocks
me, any idea how I can distinguish between the two??
TIA
Ade
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]