I want to use session in different pages.
When I open a new window in the current window, the session didn't work!!!
So how can I use the session in different pages??
Thanks~~~~
how can people know whats wrong when you post no
example of how your using the session
at a guess i would say are you registering them
//one.php <?php session_start(); $_SESSION['foo']="Hello, World!"; echo " <p> <a href=\"two.php\">Click here!</a> </p> "; ?> // two.php <?php session_start(); echo $_SESSION['foo']; ?>
?? 😕
The code looks fine.
Do you have cookies disabled? Try this, in two.php: print_r($_COOKIE);
LOL! 🙂 Yeah, the code that I posted is fine; I put it there as an example for the OP ...
Hey, we all have days like that, eh? 🆒
Heh... I saw the post noting the lack of code, followed by a post with some code, and just assumed. 🙂