Jump to content

PHP SESSIONS


mattyvx

Recommended Posts

Hi,

 

I've create a script where users can log into my site and then edit their details, the updated details are then stored to my database.

 

The users sessions are opened so the user can update their profile information and then log out. This time should be no longer than 2 hours.

 

Currently im opening the session with

 

session_start();
if((!isset($_SESSION['Email'])) || (!isset($_SESSION['Password']))){
header("location:login.php");
exit;
}

 

The questions are;

 

1) Should i set a path for these sessions to be stored?

2) How can I set an expirey time on these sessions i.e. 2 hours max

 

Thanks in advance

 

 

Link to comment
https://forums.phpfreaks.com/topic/182557-php-sessions/
Share on other sites

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.