PHP .htaccess form

Reply

Join Date: Aug 2005
Posts: 29
Reputation: vartotojas is an unknown quantity at this point 
Solved Threads: 0
vartotojas vartotojas is offline Offline
Light Poster

PHP .htaccess form

 
0
  #1
Sep 9th, 2005
For my website, I'm trying to create a login form where visitors can type in their login/password, and have PHP check that login with HTTP Authentication (.htaccess). So instead of user typing in the direct URL and entering their user/password in the pop up box, they could simply do it from a form. I was wondering if this was possible and if so how? In case you're wondering, I want to do this for conviences and design purposes. Thank you!
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 902
Reputation: chrisbliss18 is an unknown quantity at this point 
Solved Threads: 23
chrisbliss18's Avatar
chrisbliss18 chrisbliss18 is offline Offline
Posting Shark

Re: PHP .htaccess form

 
0
  #2
Sep 9th, 2005
This speaks of very poor design. It would make sense to use PHP to modify/maintain .htaccess files, but it doesn't make sense to use .htaccess files as a storage place for PHP user logins. If you like the concept of using a file, rather than a database, to store username/password combos, why don't you just put a plain-text file outside of the web-accessible directory structure and authenticate off of that?

Now if you are talking about using PHP to grant HTTP Authentication using the .htaccess file and bypassing the typical login pop-up, that is another question altogether. I don't think it is possible, but I will look. I still think it would be better design to stay away from the HTTP Authentication model completely if you don't really want to use it.

You might want to read this PHP-Based User Authentication guide for beginners for some ideas.
Did we help you? Did we miss the point entirely? Update your thread and let us know.
Don't like the answers you are getting?
Did you try searching?
Clean up and optimize Windows 2000/XP
Reply With Quote Quick reply to this message  
Join Date: Sep 2005
Posts: 51
Reputation: tristan17 is an unknown quantity at this point 
Solved Threads: 1
tristan17 tristan17 is offline Offline
Junior Poster in Training

Re: PHP .htaccess form

 
0
  #3
Sep 10th, 2005
hi vartotojas,

well from my own project, what i did was i had a table in the database that consists of all the username and passwords(encrypted form) after which, i created a login form using html with username and password boxes. Then i create a php script that will capture the username and password entered and compared it with the table i had created in the database that consists of the members' names and passwords. If match, the user can log in, if not it will not be allowed to log in.
Furthermore, u can read up more on php sessions. Hope it helps

http://www.php.net/session

rgds,
tris
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC