How to prompt the user to choose where to save a file using PHP?

2.1k views Asked by At

When I search for an answer from the web, most suggest using header() function, like the following:

$testing = $_REQUEST['filename'];
header("Content-type: application/csv");
header("Content-Disposition: attachment; filename=".$testing);
header("cache-control: private");
header("pragma: private");

However, this would only force the user to download a csv file to the default position.

What I want to do is to generate a prompt box to ask the user where to save the file, like the "Save As" dialog box created by Application.GetSaveAsFilename in VBA.

0

There are 0 answers