How to redirect to login page after user is not activated on page that means session end when user inactive for a 20 minutes.
pls give me example
How to redirect to login page after user is not activated on page that means session end when user inactive for a 20 minutes.
pls give me example
[php]<?php
if (!isset($_SESSION[‘user’])) {
header(‘Location: /login.php’);
exit;
}
// rest of code here[/php]
Duplicate post. Previously asked and answered by Jim and myself