PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
I'm moving a website I built onto a Windows 2003 Server onto which I have installed PHP. However, the session variables are not being saved from page to page. Here is the code from the first test page I built:
When I follow the link however, this page only prints out "Session: " -- the variable "level" seems to have been lost. I've checked my php.ini file to ensure that session.auto_start = 0 and now I am out of ideas. Does anyone know if I need to change a setting in Windows or if there is a different bit of code I should use?
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
Unfortunately, I've tried it with and without "session_register("level"); " as well as using "$HTTP_SESSION_VARS" instead of "$_SESSION"... still no luck getting sessions to work.
I created a new folder called "sessions" and pointed the session variables to be saved there in the php.ini file (session.save_path="C:\Program Files\PHP\sessions") , and then I fiddled with the folder permissions until it worked.