PDA

View Full Version : Logon script for secure website


Wesley
08-29-2002, 01:48 PM
Can someone please point me in the right direction. I need to be able to have users click on a hyperlink on my page that goes to a password protected website and log them in automatically with a generic username and password. When you go to the password protected site a basic Windows' "Enter Username and Password" pops up. I need to know how to use a script to write the username and password into the popup and submit it (automatically without the user even aware of what is going on). I am very new to PHP and not even sure if this is the best approach or maybe I should try another scripting language to accomplish this. PLEASE HELP!

Wesley

Spookster
08-29-2002, 09:51 PM
It sounds like you are referring to using .htaccess and .htpassword files to protect a directory. You can't automatically fill those in. The user has an option to save their login info depending on what O/S they are using but you can't fill it in for them.

What you would want to do is to use a webpage form for login of which you could then fill in the username and password for them.

Of course this might be a silly question but why password protect the site if you are going to use a generic login for everyone and then fill it in for them?