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 Quote
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. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.