Ahoy there. I am collecting data with a form and emailing it to a location in html format. They want the informaton to be in an excell document form so they can import it directly into the database.
Is there anyway to do this?
Thanks!
Ahoy there. I am collecting data with a form and emailing it to a location in html format. They want the informaton to be in an excell document form so they can import it directly into the database.
Is there anyway to do this?
Thanks!
You can easily generate a CSV instead of an excel file. That is even better for importing to a database.
Thanks I did some searching and couldn;t find any specific example on how to create a csv file on the fly.
I need to take info from a form and create the CSV file then send that CSV file thru email all on one page.
Is this possible?
Thanks!
Yeah, it's very straight forward. Create a string with each value separated by a comma. If it is a text string, then surround it with double quotes. Write the string to a file (if you have multiple rows, just add a new line for each one). Then send the email with the file.
Pig wrote:Yeah, it's very straight forward. Create a string with each value separated by a comma. If it is a text string, then surround it with double quotes. Write the string to a file (if you have multiple rows, just add a new line for each one). Then send the email with the file.
Hi Pig - This was the answer you gave to Arc's question (back in 2004) of how to create a cvs file from a form submission and send via email. For a php newbie like me I would appreciate very much if you would please show me an example of the code to generate this string using the form input.