session.php (379B)
1 <?php 2 include('config.php'); 3 session_start(); 4 5 $user_check = $_SESSION['login_user']; 6 7 $ses_sql = mysql_query($db,"select username from user where username = '$user_check' "); 8 9 $row = mysql_fetch_array($ses_sql,MYSQL_ASSOC); 10 11 $login_session = $row['username']; 12 13 if(!isset($_SESSION['login_user'])){ 14 header("location:login.php"); 15 } 16 ?>