Save contents of a database as an XML or CSV file
Posted: Tue Jun 22, 2004 5:05 am
Hi,
I would like to know how to save the contents of a database to an XML or a comma-delimited file using only PHP. Below is the basic process
1. Select required data from a table in the database
2. Format the data to the required specification e.g. XML, CSV, etc
3. Create the file
4. Prompt user for a place to save the file e.g. My Documents
5. Save the file
I believe I can do the first two but I can't figure out what I need to do to create the file with PHP, prompt user, then save.
I would really appreciate your assistance.
I would like to know how to save the contents of a database to an XML or a comma-delimited file using only PHP. Below is the basic process
1. Select required data from a table in the database
2. Format the data to the required specification e.g. XML, CSV, etc
3. Create the file
4. Prompt user for a place to save the file e.g. My Documents
5. Save the file
I believe I can do the first two but I can't figure out what I need to do to create the file with PHP, prompt user, then save.
I would really appreciate your assistance.