I don\'t know how to do it with .htaccess but would do it in PHP if posed with the problem myself. Try something like the following. Since a user can\'t view the source of a PHP file, you don\'t need to worry too much about the actual username and password being stored in the PHP code.
<?php
$user = \"open\";
$pass = \"sesame\";
// $username and $password are inputed at the bottom
if (($username == $user) && ($password == $pass)) {
?>
protected page content goes here
<?php
} else {
// if this code is run, the comparisons above must have been false, so show the login form
// by posting to $PHP_SELF, the page just reloads and processes the new info
?>
<form action=\"<?php echo $PHP_SELF; ?>\" method=\"post\">
<p>Username: <input type=\"text\" name=\"username\" size=\"15\">
<p>Password: <input type=\"text\" name=\"password\" size=\"15\">
<p><input type=\"submit\" name=\"submit\" value=\"Login\">
</form>
<?php
}
?>
This would be the quickest way. Hope it helps!