I’m so confused by session variables. They keep appearing and disappearing.
I’ve made a simplified example of the problem which you can view here.
[URL]http://www.netcartoon.net/naaas/newtry/start.php
Basically, I am trying to make a log-in page, which will re-direct the user to the page they came from once they log-in. The problem is, when I re-direct them the session variables disappear, so it doesn’t register them as logged in.
If I use a hyperlink to return them to the original page it works ok…so I was thinking it’s a problem with the re-direct? But if you look at the login1.php – it’s TOTALLY weird. It has two lines right after each other. The first one says echo the session variable ‘returnurl’ and the second creates a dynamic link using the same variable. The echo line shows nothing, but the link works fine.. Why?
I just don’t understand session variables. If you can take some time to look at this example and help me understand what is actually happening I would be so grateful.
Thanks
Toby