March 5th, 2003, 07:53 PM
pass form values to .htaccess
I need to pass variables (user and password) to an htaccess login window so that i can give the password sign in area acustom html "wrapper"
Can someone please suggest to me how to do this.
If i should post this elswhere tell me that too,
March 5th, 2003, 09:06 PM
A little confused -- normal for me!
Do you want to use HTTP Authentication, which is the grey box that pops up, and be able to use what the user enters in this box in a script?
March 5th, 2003, 10:29 PM
If you are using "basic authentication" then the credentials get sent in HTTP header variables...
I can't confirm this, but I though that PHP could do an HTTP request passing custom variables. If this is true, then it might be possible to make a PHP that uses form variables to request a page... thus doing the login.
Sorry I can't do more than theorize...
March 15th, 2003, 06:41 AM
It might just be easier to set up a simple database to hold usernames and passwords. You can encrypt the passwords to keep things safe, and it's quite easy to use this with an HTML form using something like PHP. Let me know if that helps.
March 15th, 2003, 10:17 AM
the syntax for http urls with authentication is:
in php you can thus use Header("Location: http://$username:$password@...");
Possibly not all browsers do support this, do some tests yourself to make sure...
March 15th, 2003, 12:43 PM
Tommy, you are making a fool of yourself (#3)... Read first, think next, write then.
First: Read quote #1: da_ronin wants to pass the credentials from a html form to the secured area, so the user does know the credentials already
Second: google and other search engines donīt give a fvck about Header()s (#2), so this is false too.
Third: since the user will be forwarded there by entering his credentials in a form, google would have to enter them too. It wonīt do that because search engines do not POST data nor do they know any valid username/password combo
Last edited by M.Hirsch; March 15th, 2003 at 12:46 PM.
March 15th, 2003, 03:52 PM
Fine... Pardon me to trying to help.
Just say I'm wrong. I don't mind being wrong, but I do mind you being a jerk about it.
I'm sure you are perfect and clearly an intellectual master mind. It seems you can not imagine a time when you might need my help...
Last edited by TommyWillB; March 15th, 2003 at 03:56 PM.