RSS Forums RSS
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 10138 | Replies: 2 | Thread Tools  Display Modes
Reply
Join Date: Aug 2005
Posts: 27
Reputation: vartotojas is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 0
vartotojas vartotojas is offline Offline
Light Poster

PHP .htaccess form

  #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!
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Aug 2005
Location: Oklahoma
Posts: 902
Reputation: chrisbliss18 is an unknown quantity at this point 
Rep Power: 5
Solved Threads: 23
chrisbliss18's Avatar
chrisbliss18 chrisbliss18 is offline Offline
Posting Shark

Re: PHP .htaccess form

  #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  
Join Date: Sep 2005
Posts: 51
Reputation: tristan17 is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 1
tristan17 tristan17 is offline Offline
Junior Poster in Training

Re: PHP .htaccess form

  #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  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 2:39 am.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC