<?php
/*header("Content-type: application/octet-stream");
header("Content-Disposition: inline; filename=\"booking-data.csv\"");
header('Cache-Control: private, max-age=0, must-revalidate');
header('Pragma: public');
ini_set('zlib.output_compression','0');
$data=stripcslashes($_REQUEST['csv_text']);
echo $data;*/ 
$filename=$_GET['type'].date('dmY_His');
header("Pragma: public");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Content-Type: application/force-download");
header("Content-Type: application/octet-stream");
header("Content-Type: application/download");
header("Content-Disposition: attachment;filename=$filename.xls");
header("Content-Transfer-Encoding: binary ");

echo strip_tags($_POST['tableData'],'<table><th><tr><td><thead><tbody>');
?>