Jump to content

Using PHP session instead of cookies.


sh0wtym3

Recommended Posts

I set cookies in my php script when a user logs in, and I use javascript to open certain links in a new window.

 

But when the new window is opened, it acts as if the cookies dont exist.

 

However, when you type in the URL, (instead of opening it in a new window), the cookies are recognized just fine.

 

I was wondering if there was a way to keep the user logged in inside the new window, by using php sessions?

 

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/126124-using-php-session-instead-of-cookies/
Share on other sites

have you used php sessions before they are really easy and properly the best way to keep track of users

put

session_start();

at the top of all your pages then you can use $_SESSION to store any data on any page as long as you call session_start() before any output

 

Scott.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.