Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- ob_start();
- include('dbconnect.php');
- session_start();
- $user_check=$_SESSION['login_user'];
- $sql = $db->prepare("SELECT * FROM students WHERE username=?");
- $sql->execute(array($user_check));
- $row = $sql->fetch(PDO::FETCH_ASSOC);
- $login_session=$row['username'];
- $login_id=$row['id'];
- if(!isset($login_session))
- {
- header("Location: login.php");
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement