| | |
PHP .htaccess form
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Aug 2005
Posts: 29
Reputation:
Solved Threads: 0
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!
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.
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
Don't like the answers you are getting?
Did you try searching?
Clean up and optimize Windows 2000/XP
•
•
Join Date: Sep 2005
Posts: 51
Reputation:
Solved Threads: 1
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
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
![]() |
Similar Threads
- html/php form for .htaccess validation (PHP)
- PHP Quote form (PHP)
- PHP .htaccess form (PHP)
- php login form (PHP)
- php mail form - need to redirect to new page (PHP)
Other Threads in the PHP Forum
- Previous Thread: change backslash to foward slash
- Next Thread: php_value append/prepend question
| Thread Tools | Search this Thread |
.htaccess alerts apache api archive array autocomplete beginner binary broken cakephp checkbox class cms code convert cron curl database dataentry date display duplicates dynamic echo email emptydisplayvalue error execute explodefunction file files firstoptioninphpdroplist folder form forms function functions google hack href htaccess html htmlspecialchars image include insert ip javasciptvalidation javascript joomla keywords limit link login mail matching menu methods mlm multiple mysql network object oop paypal pdf php problem query radio random recursion recursive redirect remote script search securephp server sessions shot sms source space sql subscription syntax system table tutorial tutorials update upload url validator variable video web youtube





