I'm trying to make an online shopping site, where users can make an account, and login using the details they entered on the form page.
I've only managed to make it validate the information the user has entered on the form page, and it saves the data into a users.txt using a " : " to seperate each data information, so for example in the users.txt it would be like this:
email : firstname : surname : age
Now, I want to be able to use the log in boxes on the homepage with this users.txt. And it matches the username and password in the users.txt and lets them login.
Problem is, I actually don't have a clue where to begin for that.
Another problem is, if I'm reading from the users.txt file, how can I make it search line by line, and match the username and password on the same line, instead of it trying to search the entire users.txt file and possibly finding a matched password somewhere else.
Any help would be appreciated, thanks.
*EDIT* Also, is there a way to only have one instance of an email to be registered in the text file? So that not more than one email can be used/saved?
I'm sure there's reasoning behind it, but it seems confusing that there are both low-power and efficiency cores. What are efficiency cores, if not low-power? Maybe the computer can run in a state that draws hardly any more power than standby mode...like a tablet when idle?
Question
Ryan2g
I'm trying to make an online shopping site, where users can make an account, and login using the details they entered on the form page.
I've only managed to make it validate the information the user has entered on the form page, and it saves the data into a users.txt using a " : " to seperate each data information, so for example in the users.txt it would be like this:
email : firstname : surname : age
Now, I want to be able to use the log in boxes on the homepage with this users.txt. And it matches the username and password in the users.txt and lets them login.
Problem is, I actually don't have a clue where to begin for that.
Another problem is, if I'm reading from the users.txt file, how can I make it search line by line, and match the username and password on the same line, instead of it trying to search the entire users.txt file and possibly finding a matched password somewhere else.
Any help would be appreciated, thanks.
*EDIT* Also, is there a way to only have one instance of an email to be registered in the text file? So that not more than one email can be used/saved?
Link to comment
https://www.neowin.net/forum/topic/830024-php-login-using-data-from-a-text-file/Share on other sites
15 answers to this question
Recommended Posts