I have the secure log-in form ready for the admin panel of my site. But its useless because i can just go to the directory of the admin panel page. How can i make the admin panel accessible only when the user is logged in?
While checking the user credentials while log in set a session variable if the user credentials are valid.. Then on the admin panel page check if the session variable is set or not ? If it is set then show the admin page or else redirect the user to the login page.