|
Posted by Erwin Moller on 11/23/07 08:24
jodleren wrote:
> Hi!
>
> I started a thread app 2 weeks ago and redlied to that, but it seems
> to be so low in the list, that it will not be seen.
>
> My problem - I need to transfer the sesstion to another page?
>
> say page1.php goes to page2.php ( <a href="page2.php"> ) ?
>
> So, s start_sesstion, $_SESSION["fgdf"]=fsdgdf should be readable by
> the other file... how do I achive that?
>
> WBR
> Sonnich
Add to both pages:
session_start();
Do this before you do anything else, like creating output.
so on page1.php:
session_start();
$_SESSION["test"] = "Hi";
and on page2.php
session_start();
echo $_SESSION["test"];
// should say Hi
Regards,
Erwin Moller
PS: Make sure you have error reporting ON.
PS2: Make sure your php.ini doesn't have session_auto_start on.
[Back to original message]
|