I know this is not quite what you are looking for, but it is a start.
www.mysite.com/login1.php has this:
Code:
<form action='http://www.mysite.com/login2.php' method='POST'><p><br>
<input type='password' name='pasword' value='ee'>
<input type='submit' value='Go to Next Page'>
</form>
www.mysite.com/login2.php has this
Code:
<?php
session_start();
$pasword=$_POST['pasword'];
$_SESSION['pasword'] = "$pasword";
if ( @$_SESSION['pasword'] != "secret" )
{
header("location: login1.php");
exit();
}else header("location: http://www.mysite.com/private/index.php");
?>
The protected pages have this code at the beginning of the page
Code:
<?php
session_start();
if ( @$_SESSION['pasword'] != "secret" )
{
header("location: ../login1.php");
exit();
}
This version uses one password only. It can be modified to use other passwords as well or multiple ones depending on your needs. Another version could get the info from a database, which sounds to me more along the lines of what you are wanting to do although as I am the only person on my site in need of logging in I use the above script and I use the .htaccess files as well for added protection.
Bookmarks