writing to the same file appending rows is the normal way formmail does this
u specify the csv file in a hidden field called "csvfile"
so, if u have it writing to different files, u must have done a bit of work to get that done.
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 your forms for a while. And I'm very happy with the CSV output created from the php forms. The way it's working now is that each form creates another formdata.csv file in a directory I have specified, but each time someone fills out a new form, it overwrites to a new file. Is there a way to have the form create a sequentially numbered file like formdata.csv, formdata_1.scv, formdata_2.csv, etc? Or if that won't work, to have the form write to the same file and just add new rows?
Thanks,
Bob
writing to the same file appending rows is the normal way formmail does this
u specify the csv file in a hidden field called "csvfile"
so, if u have it writing to different files, u must have done a bit of work to get that done.
sorry I don't think I explained myself clearly. each form submission is overwriting the same file. It's NOT creating a new file or appending the original file with new form data. I'm looking for a solution that the form WILL create a new file each time or if it can add data to the csv file, not replace the original data.
does this make sense?
Thanks,
Bob
Hi,
FormMail always appends to the CSV file specified in the "csvfile" hidden field.
If it's doing something different to that, then either the code (i.e. the logic of FormMail) has been changed or there's a fault in the operation of PHP on your particular server.
If you want us to look into it, we offer guaranteed support.
Otherwise, save your current copy of FormMail and use the free Upgrade Wizard to get the latest version and see if that fixes the problem.
It rarely makes sense to create a fresh CSV file for each form submission, so unless you have a good reason for that, the default operation of appending to the one CSV file is the way you want to go.
Russell Robinson - Author of Tectite FormMail and FormMailDecoder
http://www.tectite.com/
Thanks Russel. So when you say append, does that mean it's supposed to overwrite the fields or add new entries below the existing fields?
Thanks,
Bob
Hi,
If you think of a CSV file as a spreadsheet or a database, then the columns are the fields on the form and the rows are the form submissions.
Each form submission appends one row to the file.
BTW, this also means you must not use the same CSV file for different forms (i.e. where the fields are completely different).
Russell Robinson - Author of Tectite FormMail and FormMailDecoder
http://www.tectite.com/
I may have found the culprit with the script. Would this be causing the rewrite? It is in the .php script that came with the tectite form.
Code:/* Help: http://www.tectite.com/fmdoc/file_overwrite.php */define("FILE_OVERWRITE",true);
Hi,
No, that's to do with uploading files to the server.
It has no effect on CSV files.
Russell Robinson - Author of Tectite FormMail and FormMailDecoder
http://www.tectite.com/
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks