I am new to php coding, and i would really like to figure this login script out.
In my index.php file i have this code
<?Php
session_start();
include 'check.php';}
?>
in my check.php file i have this code
<?Php
if((isset($_SESSION['userid']) and strlen($_SESSION['userid']) > 4)){
echo "";
}else{
header("Location: login.php");
die();
exit;}
?>
How do i create a timeout function to redirect to logout.php after 1 hour?