I want to use php to replace data in a flatfile. (sorry about the format below, just paste to notepad for clarity):
my flat file is foramted as a CSV with the 'pipe' as the delimiter instead of a comma
each row is a 'record' with unique record numbers, "ID"
the rowdata is identified by column names at the top. Total file is 1600 lines long.
|2101|12 ft Utility Trailer|1|Trailer||30.00 |75.00 |45.00 |150.00 |||||Yes|Image2101.png|2101_S.pdf|
|2102|16 ft Utility Trailer|1|Trailer||35.00 |87.50 |52.50 |175.00 |||||Yes|Image2102.png|2101_S.pdf|
|2103|2 Person Tent|1|Camping||6.00 |15.00 |9.00 |30.00 |||||Yes|Image2103.png||
|2104|2 Person Tent|1|Camping||6.00 |15.00 |9.00 |30.00 |||||Yes|Image2104.png||
|2105|24ft -29ft Travel Trailer|1|Camper||70.00 |175.00 |105.00 |350.00 |||||Yes|Image2105.png|2105_S.pdf|
I want to update the the 'avail' colmun with "NO", the 'Name' column with a "name" and the Out and Due cols with a date
(the 'change' data is gathered from a form passed to the script by using unique record number 'ID').
I have used the following in the past, but does not work withg my hosting provider now.