vaibh_14 Posted April 17, 2011 Posted April 17, 2011 I need to set expiry time of say 30 mins on my clients browser and i ve used the following possible codes to do it : # ini_set('session.cookie_lifetime',time()+30); #setcookie('user_id','1',time()+10); and many more but later i found out that it depends on the setting of : session.cookie_lifetime value set in php.ini file of server. So may i know how do i change settings so that i ll be able to set cookie expiry time as i want and not till session expires. Currently whenever i set a cookie,its default expiry time is "till session expires". I am using browsers: IE9.Firefox 4 and chrome for testing and al give the same results. Kindly suggest moves
Guest Geoff Posted April 17, 2011 Posted April 17, 2011 You should not depend on the client's cookie expiration. You should instead verify the cookie server-side.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now