Dear Friends,

I am exporting fields from recordset idAppointment to Excel and I can manipulate which records I want to recive in xls file. here you go that's the code

<?

mysql_connect("localhost","username","password");
mysql_select_db("database_name");


$result=mysql_query("select * from appointment where idTypeBooking = 1 AND newapp = 0 AND wedding = 0 order by idAppointment asc");


function xlsBOF() {
echo pack("ssssss", 0x809, 0x8, 0x0, 0x10, 0x0, 0x0);
return;
}
function xlsEOF() {
echo pack("ss", 0x0A, 0x00);
return;
}
function xlsWriteNumber($Row, $Col, $Value) {
echo pack("sssss", 0x203, 14, $Row, $Col, 0x0);
echo pack("d", $Value);
return;
}
function xlsWriteLabel($Row, $Col, $Value ) {
$L = strlen($Value);
echo pack("ssssss", 0x204, 8 + $L, $Row, $Col, 0x0, $L);
echo $Value;
return;
}
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=orderlist.xls ");
header("Content-Transfer-Encoding: binary ");

xlsBOF();



xlsWriteLabel(0,0,"BeautyCall.co.uk - Excel Sheet - New Wedding Appointments");


xlsWriteLabel(2,0,"REF Number");
xlsWriteLabel(2,1,"Name");
xlsWriteLabel(2,2,"Mobile");
xlsWriteLabel(2,3,"Email");
xlsWriteLabel(2,4,"Date");
xlsWriteLabel(2,5,"Time");

$xlsRow = 3;


while($row=mysql_fetch_array($result)){

xlsWriteNumber($xlsRow,0,$row['idAppointment']);
xlsWriteLabel($xlsRow,1,$row['stName']);
xlsWriteLabel($xlsRow,2,$row['stMobile']);
xlsWriteLabel($xlsRow,3,$row['stEmail']);
xlsWriteLabel($xlsRow,4,$row['dtWedding']);
xlsWriteLabel($xlsRow,5,$row['stWeddingTime']);

$xlsRow++;
}
xlsEOF();
exit();
?>

My question is: Is there is any chance to use $_GET or $_POST or ID number to recive excel sheet with 1 particular recordset. For example
I will click the link: www.testwww.com/excel_file.xls?id=14

and the file excel_file.xls will only contains data form the recordest with the ID number= 14

Thanks )
Cheers