Below I show the beginning of my index.php program, the code that I have in the beginning is not working for me what ever I try to do with it, I have run out of idea. What the code hopfully should do is to jump to program logout_member.php if there has been no activity for 5 minutes else run normaly, that is what happends for me, it just run as normal.
______________________________________________________________________________________
<?php
$maxlife = 300; // 5 minutes
session_start();
if (isset($_SESSION['last_accessed'])) {
if ($_SESSION['last_accessed'] < (time() - $maxlife)) {
# Session Expired go to LOGOUT program
header ("Location: ./wds_loginsystem/admin/logout_member.php");
} else {
# Session Still Active
$_SESSION['last_accessed'] = time();
}
} else {
# New Session
$_SESSION['last_accessed'] = time();
}
?>
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/gmf_master.dwt.php" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- InstanceBeginEditable name="doctitle" -->
<title>GMF Uppsala - Startsida</title>
<!-- InstanceEndEditable -->
<link href="css/uppsala_styles.css" rel="stylesheet" type="text/css" />
More code ofcource below!
____________________________________________________________________________________________________________________________
I hope for some help from you
Greger Stag