I have 2 questions and i think i have gave enough points. both are related to file handling in php.
I have some HTML forms with different fields
form1 form2 form3 and so on upto 6 forms
firstname username firstname
username sex your city
lastname email your country
i have a text file like userdetails.txt. The file contains all the fields seperated by tab spaces.
username firstname lastname sex email age city country and so on.
so when the user submits the form i need to enter all the fields of forms into the text file.It is not mandatory that user should enter all the fields. If he leaves some fields empty then in the text file the values corresponding column will be null.
There is a text file will some numbers in it.
and so on.
i want to read the last number from the file . i take some number as user input from a form and i want to add that many numbers starting from the last number taken from file.
user input: 4
read last entry from file:5
append to file 6 7 8 9. these numbers must be appended in each line into the text file
I also have an idea of implementing the above but has some problems. If the first case does not work then i am thinking of database table,which is easy to implement. Second case i am able to get the numbers to put into file. But i dont get an idea to keep the numbers in seperate lines.