How do I make the session cookie always update the expiration date for both the client and the server so the expiration is extended (in this case, 30 minutes) each time the client makes a request to the server?
<?php
session_name('session');
session_start();
?>
Adding setcookie
after session_start()
is working as expected.
<?php
session_name('session');
session_start();
setcookie(session_name(), session_id(), time() + 3600, '/');
?>