Ok this is for you php gurus
This is a tuff one because it deals with php and flat files, like .txt documents.
I have a text file, inside that file are accounts formatted like this
[username]
PASSWORD=whatever
EMAIL=whatever@whaterc.com
Now theres an html form that has the text fields username and pass.
What I need is for a php script to read the text file with the accounts, until it comes across a matching
username
pass
to the same one that was entered in the html form, if it does not match it, kick them back to a page. If it does match it, write the username to a variable to be used in another php script, if possible?
Then on html form 2. It has a space for new password, email.
What the second php script is supposed to do is take the variable from the earlier script that allowed them to get here, take the new variable password, and the new email
and write it to a text document formatted like
[username]
PASSWORD=newpass
EMAIL=whatever@whatever.com
then kick them back to another page.
So far I have gotten the second script working fine except for the global variable username.
But the first script i have no idea how to make it work, and pass the variable on.
Might be more than once person using it, so figured a lock until it finishes read and writing would help.
Any ideas?
thanks