Silverado_NL Posted March 21, 2007 Share Posted March 21, 2007 hey everybody, i am currently trying to get my script to save some database results to a CSV (Comma Seperated Values) File. getting the format right is not a problem, but having the users browser to save this as a CSV file is!!!. what im trying to do is to display the information on screen, and when they want to, also being able to press File & Save As button in the browser. and then trying to save the file like a CSV file instead of html or txt. is this possible to work out? or will i have to write the information into a self made file (on the server) and give the user a link to the file??? i know this last option is possible, but the first would be a better option for me! if anybody has a any idea, plz let me know:) Thanks in Advance. Silverado Link to comment https://forums.phpfreaks.com/topic/43676-database-results-into-browser-page-that-is-a-downloadable-as-a-csv-file/ Share on other sites More sharing options...
UTAlan Posted March 21, 2007 Share Posted March 21, 2007 Your best bet would be to look into changing the MIME type of the page to "text/csv", although I'm not sure if that would work or not. Link to comment https://forums.phpfreaks.com/topic/43676-database-results-into-browser-page-that-is-a-downloadable-as-a-csv-file/#findComment-212035 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.