After You Read Export MySQL Query to excel with PHP, maybe you also want a to Export MySQL Query to Word with PHP. Same as Export MySQL Query to Excel before, We just need to change two words.
We Just need a Connection, a Table that contain MySQL Row and This Great Script with a bit changes..
header("Content-type: application/vnd.ms-excel");
header("Content-disposition: attachment; filename=cetak_excel.xls"); // filename
header("Pragma: no-cache");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Expires: 0");
Change the green highlighted words to be :
header("Content-type: application/vnd.ms-word");
header("Content-disposition: attachment; filename=cetak_word.doc"); // filename
header("Pragma: no-cache");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Expires: 0");
Well Done You Can Produce an Word File that Export MySQL Query to word with PHP.
Saturday, January 16, 2010
Export MySQL Query to Word with PHP
11:50 PM
ari sari
No comments
0 comments:
Post a Comment