Hi guys,
I want a button which, when users click, it downloads a csv file which returns all the results from a MySQL database.
Using PHP, here's what I had
But it's not working
Any ideas?
I want a button which, when users click, it downloads a csv file which returns all the results from a MySQL database.
Using PHP, here's what I had
PHP:
<p>Export all contacts from within the database to a CSV file</p>
<form><input type="button" value="Download Now" onClick="<?php
SELECT * INTO OUTFILE 'c:/mydata.csv' FROM contacts;
?>"
</form>
<br />
But it's not working
Any ideas?