Re: session

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I believe you need to pass the session variable along to the next page...
Something like:

On page 1:
if session is set
{
   $s = SID;
   echo "<a href=\"page.php?$s\">Link</a>";
}


----- Original Message ----- From: "H. J. Wils" <double_u1@xxxxxxxxxxx>
To: <php-db@xxxxxxxxxxxxx>
Sent: Sunday, October 17, 2004 9:38 AM
Subject: session



sorry, forgot to change the subject :), just to be sure here is my question again..

Hi everybody,

For quite a while i'm struggeled with my session. It doesn't seem to work, can anyone help me?

This is my code:

page 1:
session_start();
$_SESSION["test"] = "tryin...";
if (isset($_SESSION["test"]))
{
 echo "<a href='session2.php'>next page</a>";
 echo "<br>".session_id();
}

page 2:

session_start();

if (isset($_SESSION["test"]))
{
 echo $_SESSION["test"];
}else
{
 echo "No sessionvariable found..";
}
echo "<br>".session_id()."<br>";

On page two, there's always the 'no sessionvariable found...'-message, further the session id also changes... i dont understand what i am doing wrong...

_________________________________________________________________
Play online games with your friends with MSN Messenger http://messenger.msn.nl/


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux