I need to run a php file in the background by clicking a input type button
without navigating away from the page that the button is placed
The php file have the following headers (basically it will prompt a file generated download)
I have no information to post.
I also would like to know in the php file which prompts the download of the file, if I can save a copy of the file on the server at the same time? how would I do this ?
// output headers so that the file is downloaded rather than displayed
header('Content-Disposition: attachment; filename="demo.csv"');
// do not cache the file