|
#1
|
|||
|
|||
|
Hey,I made my own registration form today in a html document and it looks like this:
Quote:
Quote:
I know you are able to and it is safer to use a database to hold all the info from the form but I want to use a .txt file. How make the info that was entered into the form to be sent to a .txt file in some directory and still go to the test.php page. Then I want to be able to use a .htaccess file to protect the members directory and when you try and enter the members directory a box pops up saying enter your username and password and when you enter them in is scans throught the .txt file and tries to find a match. How can that be done? Thank You! |
|
#2
|
||||
|
||||
|
Quote:
Quote:
Quote:
If I'm right, it means that your project is a no-go, since if all users have access to the file, your password protection is useless. But anyway, as for how it can be done (if you decide it's really what you want to do), it's quite easy; the file you want to write to simply needs to be named as, and have the format of, the regulation Apache .htpasswd file, since that's effectively what it's taking the place of.
__________________
Oracle's backup tutorial "A lot of people say games are addictive. Well, they're addictive in the sense that anything you like doing you repeat endlessly. But no one would say, 'Mr Kasparov, you have a chess problem,' or 'Tiger Woods, you have a golf addiction.'" - Ian Livingstone, Creative Director, Eidos. "A problem well stated is a problem half solved" - Charles Franklin Kettering |
|
#3
|
||||
|
||||
|
It's easy enough to set permissions for the file/folder to allow PHP to read the file but block the browser from reading it.
I would just suggest that you do some more learning then go for the database option as it will be much easier in the future.
__________________
Cheers, Degs Please post back with your results CTH Terms of Use CTH Subscriptions :: Adaware Guide :: HijackThis |
![]() |
| Bookmarks |
«
Previous Topic
|
Next Topic
»
| Topic Tools | |
|
|
All times are GMT +1. The time now is 01:34 PM.
[
RSS ]








