session_start();
if(!isset($_SESSION['passok']))header("Location:pass.php");
at head of files in this folder. pass page gets input - if ok set session variable.
diafol
Keep Smiling
10,644 posts since Oct 2006
Reputation Points: 1,628
Solved Threads: 1,508
Skill Endorsements: 57
your pw form sends data to a form handler page which sets the session variable then redirect to the default page in the protected folder if pass matches the expected pw. if no match redirect to the pw form again with an error msg.
diafol
Keep Smiling
10,644 posts since Oct 2006
Reputation Points: 1,628
Solved Threads: 1,508
Skill Endorsements: 57
Stefano Mtangoo
Senior Poster
3,731 posts since Jun 2007
Reputation Points: 462
Solved Threads: 396
Skill Endorsements: 0