Skip to content
Advertisement

Tag: session

session wiped out between pages

I’m making a login page and for some reason the session will not persist between where I set it and the page where I am forwarding to. I can comment out the header in the page where the session was initialized and see that the session has the data in it. However, when I do a print_r in the target

What is PHP session_start()

Does it start a current session based on cookies? Got that from the PHP website. How does PHP control the session? If I start a session when a user opens up my login page, what do I even use that session for? Can I use the current session to get info about the logged in user? Answer The PHP session

PHP – make session expire after X minutes

i am using the following technique… From the login.php the form posts to the page check.php where i do this and on loggedin.php page the first thing i do is but once logged in when i directly type the url localhostmyProjectloggedin.php it displays the page…which makes perfect sense because the session has started what i want to implement is The

PHP Session Id changes between pages

I have a problem where i am losing the PHP session between 2 pages. The session_start() is included in a file called session-inc.php into every page requiring a session to be set. This works for all pages on the site except one particular page, member-profile.php. When this page is visited a new session with a different id (same session name)

How do PHP sessions work? (not “how are they used?”)

Session files are usually stored in, say, /tmp/ on the server, and named sess_{session_id}. I have been looking at the contents and cannot figure out how they really work. Fetching the variable name and and content from the file is easy. But how does PHP know what session belongs to whom? The session_id seems totally random and one IP address

PHP Pass variable to next page

It seems pretty simple but I can’t find a good way to do it. Say in the first page I create a variable And the form’s action for that page is “Page2.php”. So in Page2.php, how can I have access to that variable? I know I can do it with sessions but I think it’s too much for a simple

Advertisement