Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- session_start();
- $username = $_SESSION['login'];
- $password = $_SESSION['password'];
- $query = "SELECT * FROM users WHERE username='$username' AND password='$password'";
- $check = countRows($query);
- if($check == "0" || $check == 0){
- echo 'Please logout';
- header("location: includes/logout.php");
- return false;
- }
- unset($check);
- if (!isset($_SESSION['login'])){
- header("location: index.php"); // redirects to login page
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement