I think I have a header related problem, am kinda new to them; here we go: On 'summary.php' I have links that when I click, ajax a value to another page called 'note.php'. Note.php has a header which i use to produce an MS-Word document - this works fine BUT ONLY WHEN I RUN note.php DIRECTLY, the Word file gets downloaded easily. But no Word file download when I use the click-button-to-download-document. Where should I look?
session_start();
include('otc_toolbox.php');
//ob_flush();
/*
if(isset($_POST["month"]))
{
$month = $_POST["month"];
$member= $_POST["member"];
}
*/
$month = $_POST["month"];
$member= $_POST["member"];
//else exit();
//Get current date
$date = date('Y-m-d');
//Prepare document html
$dnoteHTML = '';
$dnoteHTML .= '<html><body><table style="width:100%;">';
......
//header("Content-type: application/vnd.ms-word");
//header("Content-Disposition: attachment;Filename=DebitNote.doc");
echo $dnoteHTML;