Click to See Complete Forum and Search --> : Login Text File Database


JKnoch
03-08-2008, 07:57 PM
Im taking over a non for profit site, that has no budget. They want to set up a member login so members who have payed their dues, can access newsletter and other member forms. Nothing will be terrible important or needs to be secure. The owner of the site wants to be able to update the database of names regularly when member pay their dues.

I was thinking that maybe I could have a text file with members email addresses. That file can easily be updated and uploaded by the site owners with no help from me.

My plan is to have the login in form check the text file for the email address. If the email address is on the text file, they get access, if not the do not. Is this possible?

I know I can set up an array on a php page to check for email addresses, but I can imagine that it would be too confusing for the site owner to change that, but setting up text file list should be easy enough.

TecBrat
03-08-2008, 10:03 PM
that is definatly doable. Do a search on PHP Flat File Database and you'll find a lot of examples of how that can be done.

Or, since you said the client is capable of uploading the file you could start them off with<?
$approved_emails = array(
"name@domain.com",
"name2@domain.com",
"anothername@somewhere-else.com",
);
?>

That shouldn't be too confusing for anyone that you'd trust with an FTP program.

Or you could fread them from a simple text file.http://www.w3schools.com/php/func_filesystem_fread.asp

JKnoch
03-08-2008, 10:32 PM
I dont know if I truly trust them with the ftp accessing to the site. They said they can handle it, but Im not entirely sure yet. I was thinking of giving the site owner the ability to upload the text file through the website, and not actually an ftp program. Im in the beginning stages of this project, just got their list of "we would likes" from them so far.

NogDog
03-08-2008, 11:11 PM
You might want to take a look at this code I put together a couple years ago: http://www.charles-reace.com/PHP_and_MySQL/Login_Control/