hi all,
okay i have constructed a string in flash and sent it to a php file using the
sendAndLoad("http://myfile.php", myData, "POST") method which sends the data to a php file
in my php file i have
<?php
$exceldata = $_POST['exceldata'];
$toSave = "$exceldata";
$fp = fopen("excel_test.csv", "x");
if(fwrite($fp, $toSave)) echo "writing=Ok";
else echo "writing=Error";
fclose($fp);
?>
this grabs the data from post and writes a csv file from flash.
my question is : i want the "save as" window to pop up and ask where the user wants to save it
as using the above code the csv file is placed in the same directory as the php file.
i have tried
header("Content-type: application/force-download");
but nothing happens as i assume the page is not loaded (serverside)
any ideas ?