My experience is that using .htAccess to password protect a directory, it brings up a modal dialog box. And for some browsers (FF and Chrome) don't show the checkbox for "remember" this password.
Is there a way to that a password protect a directory and have the user fill in the username and password within the web page?
Or, is there a way to force the browser to remember that password?
Short answer: No
Long answer: The dialog in your browser is opened when the server sends the
401 Not Authorized
response code followed by theWWW-Authenticate: Basic realm="insert realm"
header. The specs do not include headers to control the dialog behavior.To display a webpage you need to get a little bit fancier and consult the programming language of your choice.
There is no simple way to achieve what you want with password based authentication
Use a web-application-framework.. like Drupal. Then put this at the top:
FYI: IT changes with each version. Then only allow profiles, or users based on their profile name or userid in that system, or as above, the individual permission. https://stackoverflow.com/questions/2496348/checking-drupal-authentication-from-external-php/2499464#2499464
Then use the authentication modules, interactions, protections etc, already built into that. Takes care of all the heavy lifting and updates to the API.
There are loads: Symfony, Magento, Zend... GIYF..
Take a look at the "Auto Auth" Firefox plugin: https://addons.mozilla.org/en-US/firefox/addon/autoauth/