<?php
$name = 't1__'.date('m-d-Y_hia__').$_GET["ident"].'.txt';
$myfile = fopen($name, "w") or die("Unable to open file!");
fwrite($myfile, $_GET["value"]);
fclose($myfile);
?>
Hi! I need help!
So.. I have a file axWrite.php that will get the values from a web-based study I created, but I want to add a download button to get a csv file with the content when I open each file.
For example, from this picture: Picture of the files created from axWrite.php I want to be able to either download when I click the link or when I enter the file I can have a button to download to a csv file inside the page Inside the page with the get values
I have tried:
$filename = $name.".csv";
header("Content-Disposition: attachment; filename=\"$filename\"");
header("Content-Type: text/csv; charset=UTF-16LE");
$out = fopen("php://output",'w');
but it doesnt do anything because it only creates a blank page when i hit on axWrite.php.
Any help would be helpful!
Thanks,