There are 3 users in my database
id username password
1 bhaku 123
2 navin 124
3 avinash 123
I want restrict page access. User 'bhaku' will able to access the Page after login. & another users cannot access by loggin in or directly.
I used below code;
session_start();
if($_SESSION["full_name"]!="bhaskar")
{
header('Location: index.php');
}
but its throwing "Indirect Loops" error.
and any user can access the page.
So what's the solution?