How do I extend the cookie expiration time in php every time I regenerate the session ID?


i am having a session manager page as sessmgr.php. This page is supposed to validate the user log in information and set the cookies and keep the session variables alive by updating the cookies expiration time and regenerating the session id by an xml http request at regular intervals till the user logs out. I am able to update the session id but not extend the cookie expiration time. How to update the cookie expiration time here ??

You should be able to update the expiration time with setcookie like:

setcookie("Cookiename", $value, NewExpirationTime)

Check if the Cookiename is exactly the same so that the old Cookie will be overwritten.