login security

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
permuganza
Forum Newbie
Posts: 1
Joined: Mon Jul 28, 2008 9:29 am

login security

Post by permuganza »

Hi guys, how do i protect my login script from people who copy the url of the page into the address bar and go directly to page where the login script is supposed to lead them.
Your help is warmly welcomes
Hugs
User avatar
jaoudestudios
DevNet Resident
Posts: 1483
Joined: Wed Jun 18, 2008 8:32 am
Location: Surrey

Re: login security

Post by jaoudestudios »

When the login script confirms the user set a session variable.

At the top of the page that you want to protect check for this session variable, if it is not set then redirect them to the login page, if it is set then display the page :)
Post Reply