Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

pass username to http authentication box with php

Status
Not open for further replies.

jennyflower

Programmer
Oct 10, 2006
60
GB
Hi, is there anyway to send the username to a htaccess set http authentication login dialogue using php? some kind of header to something perhaps?

Thanks
 
Hi

Not sure that I understand you correctly. The authentication on the site is basic HTTP authentication, but for the credentials you want to use a HTML [tt]form[/tt] instead of each browser's own authentication dialog ?

As far as I remember from my old tests, that can be done with PHP.

Did you read "HTTP authentication with PHP" ?

Feherke.
 
No, I want to use the dialog that pops up but I want to have the username field filled in automatically to a default username value.
 
It *may* be possible to get PHP to generate a javascript which then can post to the login-form.

Not sure, but even if it's possible, this would mean the username/password would be easier to crack/read, since the JS will show in the html-code.

--

However, what I *think* is possible is this:


I believe this works for the http digest?

Olav Alexander Mjelde
Admin & Webmaster
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top