Security

I have my enter page with user: and password: fields.How can I let to user to view another pages ONLY after he fill right this fields on enter page.Also I want to know how can I protect my pages from changing manually of URL without enterpage.
Thanks.

If understand what you are trying to do, you need to write an authentication script and you to make so users can only view certain pages after login look into using sessions.

http://www.php.net/sessions

Make a session called logged in or something by doing this:

$_SESSION[‘Logged_In’] = “true”;

on the page you want protected put this.

if ($_SESSION[‘Logged_In’] == “true”) {
// code to show page
}
else
{
echo “Unauthorized”;
}

Sponsor our Newsletter | Privacy Policy | Terms of Service