My data exports without issue, until I get to the very bottom... if I include
header("Location: exportresult.php")
before
print "$header"."$data";
then I am transferred to the result page, but the excel file does not export. If I include header(Location) after the print line, the excel file exports but I am not transferred to the correct result page... is there any way to get to a confirmation page that the file has exported?
if ($header!="" && $data!=""){
header("Content-type: application/octet-stream");
header("Content-Disposition: attachment; filename=$title.xls");
header("Pragma: no-cache");
header("Expires: 0");
//header("Location: exportresult.php");
print "$header"."$data";
} else {
header("Location: exportproblem.php");
}