Hello, i setup a file to export my database to an Excel Spreadhsheet file... On my MAC it automatically downloads it to the desktop which is what i set it up to do on MY computer, but when the general membership goes to download it i want then to be able to say WHERE they want to download it to. When i did it on my PC it just dowloaded it into the browser. That will be to complicated for our membership so i would like to make it so that ir prompts the user to save the file in a folder of thier choosing... is this possible?
<? header("Content-Type: application/vnd.ms-excel");
header("Content-Disposition: inline; filename=\"membership.xls\"");
//pconnect file
mysql_connect("blah blah blah");
@mysql_select_db("blah") or die( "Unable to select database");
$q="select lastname, firstname, membernumber, license_number, address1, address2, address3, city, state, zip, workplace, workaddress, workcitystatezip, class, district, job_description, addschool, addschool2, addschool3, pager, cell, home, work, fax, email from membinfo";
$r=mysql_query($q);
echo ("Last Name". "\t" ."First Name". "\t" ."Member Number". "\t" ."License Number". "\t" ."Address 1". "\t" ."Address 2". "\t" ."Address 3". "\t" ."City". "\t" ."State". "\t" ."Zip". "\t" ."Work Place". "\t" ."Work Address". "\t" ."Work City State Zip". "\t" ."Class". "\t" ."District". "\t" ."Job Description". "\t" ."Add School". "\t" ."Add School 2". "\t" ."Add School 3". "\t" ."Pager". "\t" ."Cell". "\t" ."Home". "\t" ."Work". "\t" ."Fax". "\t" ."Email". "\n");
while ($a=mysql_fetch_array($r)){
echo ($a["lastname"]. "\t" .$a["firstname"]. "\t" .$a["membernumber"]. "\t" .$a["license_number"]. "\t" .$a["address1"]. "\t" .$a["address2"]. "\t" .$a["address3"]. "\t" .$a["city"]. "\t" .$a["state"]. "\t" .$a["zip"]. "\t" .$a["workplace"]. "\t" .$a["workaddress"]. "\t" .$a["workcitystatezip"]. "\t" .$a["class"]. "\t" .$a["district"]. "\t" .$a["job_description"]. "\t" .$a["addschool"]. "\t" .$a["addschool2"]. "\t" .$a["addschool3"]. "\t" .$a["pager"]. "\t" .$a["cell"]. "\t" .$a["home"]. "\t" .$a["work"]. "\t" .$a["fax"]. "\t" .$a["email"]. "\n");
}//end while
?>
thanks in advance!
JDW