getDBConn(); $sql = "SELECT * FROM report.view_la_uninstall_feedback WHERE req_received_ts BETWEEN '". $validity."' AND '".$dim."' AND product_id = '".$param[0]."'"; $result = pg_query($db, $sql); $report = array(); while($row = pg_fetch_array($result, NULL, PGSQL_ASSOC) ) { array_push($report, $row); } $product_name = str_replace("_","-",$param[4]); /* /// txt file $fname = 'uninstall-feedback-report-'.$product_name.'.txt'; header('Content-Description: File Transfer'); header("Content-type: application/text"); header('Content-Disposition: attachment; filename='.$fname); header('Expires: 0'); header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); header('Pragma: public'); */ /// xls file $fname = 'uninstall-feedback-report-'.$product_name.'.xls'; header('Content-Description: File Transfer'); header("Content-Disposition: attachment; filename=\"$fname\""); header("Content-Type: application/vnd.ms-excel"); header('Expires: 0'); header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); header('Pragma: public'); ob_clean(); flush(); for($i=0;$i