Security


#1

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.


#2

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


#3

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”;
}