Re: login script using file, not mysql [message #171607 is a reply to message #171603] |
Tue, 11 January 2011 23:08 |
Peter H. Coffin
Messages: 245 Registered: September 2010
Karma:
|
Senior Member |
|
|
On Tue, 11 Jan 2011 22:17:33 +0100, Luuk wrote:
> On 11-01-11 22:04, Denis McMahon wrote:
>> You can write a password / access control system in php that uses a
>> plain text file to store passwords, but there are issues with doing so,
>> one of which is the need to allow concurrent write access to the file if
>> two users decide to update their passwords at once.
>>
>
> if 'write access' is needed to the file
>
>> Using a suitable database avoids such issues.
>>
>
> than 'write access' is also needed for the database
>
> so, using a database, and not a file, dose not avoid such issues....
If write access is NOT needed, is a lot easier just to hardcode all the
passwords into the PHP script and not bother with the file in the first
place.
But the INSTANT you start talking about "but what if a script needs to
generate the password access" or something, then you're right back into
"Write access is needed."
--
Graham's First Rule of Internet Retailing:
If your 'shopping cart' site requires anything more complex than
HTML, SSL and a session cookie, at least one of your competitors
will run a site which does not. Your competitor will get the sale.
|
|
|