hi im trying to restricting access to a particular page but for some reason it non working this is my code for the login <?php session_start(); include ('connect.php'); if (isset($_POST["submit"])){ $user = $_POST['u_name']; $pass = $_POST['pwd']; if(!$user){ echo "please enter your username. <br>"; } if(!$pass){ echo "please enter your password"; header('Refresh: 3; index.php'); } if ($user && $pass){ $sql= ("SELECT * FROM user_accounts WHERE username = '$user' AND password = '$pass' "); $res = mysql_query($sql); $count = mysql_num_rows($res); if ($count ==0){ echo "ur user name or password may be incorrect! try again";header('Refresh: 5; index.php'); } ELSE { if ($count ==1){ $row = msql_fetch_array($res); $_SESSION['is_logged_in']=1; echo "$user have successfully been logged in. "; header('Refresh: 5; music.php'); } } } } ?> PHP: and this is my code for the restricted Page. <?php session_start(); if(!isset($_SESSION['is_logged_in'])) { header("location:accessdenied.php"); } ?> PHP: could any one help me with that Please