The solution: upgraded formmail to the latest (from v7.12 conditions!) and use csv filters to escape the embedded quotes. In short, RTFM.
g
Welcome to the Tectite Forums! You can download and get support for our free PHP FormMail (form processor) and other free software.
I've been using FM for some time without problem. Today I got stumped: a form was submitted in which one of the form fields had embedded quotes. The field read, in part, '...to assist "Read Up" adult literacy...' (single quotes mine). I've been using fgetcsv() to parse the csv attachment. The embedded quotes caused field contents to shift; I ended up manually editing the incoming csv file to handle the attachment. The csv contents end up in a database.
I could use some help coming up with a better method of parsing the contents of the attachment. I've looked at parsecsv.lib.php, a class for parsing csv files but had no luck with it. It didn't seem to do a thing with the incoming file.
Surely someone out there has a solution to this?
Thanks.
george
The solution: upgraded formmail to the latest (from v7.12 conditions!) and use csv filters to escape the embedded quotes. In short, RTFM.
g
Last edited by GeoBrooks; 27-Nov-2010 at 06:58 PM. Reason: added previous version
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks