Menu
I’m using sessions for the first time, and I need to make it so that when the session expires in 30 minutes, it jumps to the login page. How would i go about doing this?
my session looks like this atm
[code=php]<?php
/* set the cache limiter to ‘private’ */
session_cache_limiter(‘private’);
$cache_limiter = session_cache_limiter();
/* set the cache expire to 30 minutes */
session_cache_expire(30);
$cache_expire = session_cache_expire();
session_start();
if(!isset($_SESSION[username])){
header(“Location:index.php?func=login”);
}
?>