Php – File Save And Loading

Hello there,

I basically need to save a file (CSV is ok, XML better) from a HTML form. The user will input regular registration data, such as First Name, Last Name, primary email, alternative email, Institution and Password.
The name of the saved file should be consisted of some of the textfield from the html form (probably first name, last name, email). The created file should of course get all the data from the form.
This registration should have an option of active or inactive account. The inactive should be default. It can be 0 or 1. The user will have to pay by paypal or moneyorder to get his activation. If he/she chooses paypal, then he will have to be redirected to paypal… pay the amount and go back to the website. Once the site receives the confirmation of payment then the account should be activated, automatically of course. For the money order option I can do it manually basically changing the file. For both cases an email should be sent for the admin.

After this step, if an user wants to retrieve his/her information, there will be another page, with maybe 2 or 3 text fields (first name, email, password)… then the server has to search with the strings that the user entered if there is that value in the filename on the filesystem. If so, then it should open the file (if the password is the same as what is saved in the file) loading the textfields into the html form and giving the user the opportunity to change whatever he/she wants.

It may sound crazy, since I am asking for something that could be easily done with a mysql database, unfortunately I have no other choice.

Does anybody can help me with this? I tried to explain as much as I could, actually it is just a straight-forward implementation. No time wasted with design is needed. I just need the code working.

Thanks.

Leave a Reply

Your email address will not be published. Required fields are marked *