If a user not login and try to open page
< ? php
session_start();
if (!$_SESSION["userid"])
{
// User not logged in, redirect to login page
header("location: index.php");
}
?>
Copy and paste above code on every page of your webapplication :)
No comments:
Post a Comment