By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,521 Members | 1,460 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,521 IT Pros & Developers. It's quick & easy.

Indefinite session?

P: n/a
What is the easiest way to set up a session that only expires when the
browser is closed?
Feb 10 '08 #1
Share this Question
Share on Google+
2 Replies


P: n/a
On Feb 10, 12:40 am, turnitup <same@samewrote:
What is the easiest way to set up a session that only expires when the
browser is closed?
session_set_cookie_params(0);
Make sure to do this before session_start() is called. PHP defaults
to this session cookie lifetime unless it is changed in the ini file.
Feb 10 '08 #2

P: n/a
flowover wrote:
On Feb 10, 12:40 am, turnitup <same@samewrote:
>What is the easiest way to set up a session that only expires when the
browser is closed?

session_set_cookie_params(0);
Make sure to do this before session_start() is called. PHP defaults
to this session cookie lifetime unless it is changed in the ini file.
Thanks. Will give it a shot.
Feb 10 '08 #3

This discussion thread is closed

Replies have been disabled for this discussion.