Hi PHPMan,
Take a look at the HTTP Authenicate notes in the manual. It's probably the most secure method to use, but if you don't want to use that, take a look at this script:
<?php
if (isset($submit)) {
if ($password == "mypass") {
PUT CONTENT HERE
} else {
echo ("Password Failed.");
} else {
?>
<FORM ACTION="this.php" METHOD="post">
<input type="password" name="password">
<input type="submit" name="submit">
</FORM>
<?php
}
?>
Regards,
David