Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End How to store numeric form values and retieve the total sum of them. Reply To: How to store numeric form values and retieve the total sum of them.

#282961
Beverleyh
Participant

Editing rows: To find out more about targeting individual rows/lines in a single text/csv file, Google something like “php edit specific line in text file” to begin your research – it usually involves reading the lines of a text file into memory and numbering them along the way. OR, you can store each row/line in its own text file, and the file name could be the row identifier (rather than the line number from a single larger file stored in memory).

Editing columns: if you use a delimiter (e.g. ”##”) to separate cell data in each column, you can use explode() in PHP to separate the data at that delimiter when you retrieve it, then you can use implode() and the same delimiter to join the column data back together when you save it again.

When assessing what’s good for your project, only you can make that assessment I’m afraid. You might have to try out/research several solutions until you come up with something that fits your needs/scale/time/budget/skill, etc.