Using Apache1.3.27/PHP4.3.1 on W2003Server
I have built a few scripts that pass session variables between pages to display data. I have also read on the session_destroy function and got it to work correctly, that is, it removes the cookie generated on, for example, Page1. However, I need the user to be able to go to Page2, which needs some of the session variables to display additional data.
If I use session_destroy() at the bottom on my script on Page1, and the user decides to go to Page2, my Page2 returns errors because no session variables got passed to it from Page1.
What I would like to be able to do is that when a user opens the app, a session is started, a cookie is written, and as long as they keep their browser up, the session cookie remains. If they close the browser, the session cookie is deleted from the server.
Am I correct in thinking I need to use the session_destroy() function?
I have built a few scripts that pass session variables between pages to display data. I have also read on the session_destroy function and got it to work correctly, that is, it removes the cookie generated on, for example, Page1. However, I need the user to be able to go to Page2, which needs some of the session variables to display additional data.
If I use session_destroy() at the bottom on my script on Page1, and the user decides to go to Page2, my Page2 returns errors because no session variables got passed to it from Page1.
What I would like to be able to do is that when a user opens the app, a session is started, a cookie is written, and as long as they keep their browser up, the session cookie remains. If they close the browser, the session cookie is deleted from the server.
Am I correct in thinking I need to use the session_destroy() function?