Hi, i'm trying to alter the expiration of a cookie/session i have so that this particular page can be opened for up to 12 hours before the session expires and the user is redirected to a new page.
My code, however, is not working. It redirects after default session expiration. Here it is:
$expireTime = 606012;
session_set_cookie_params ($expireTime);
require_once("includes/session_set.php");
this is session_set.php:
session_start();
if(!isset($SESSION['id'])){
header ("Location: http://" .
$SERVER['HTTP_HOST'] .
dirname($_SERVER['PHP_SELF']) .
"/index.php");
ob_end_clean();
exit();
}
define("ID", $_SESSION['id']);