Export MySQL Query to excel with PHP

I still need learn a lot of PHP Programming. A Reporting is Important in Information System. People usually use PDF an Excel in Reporting. Don't be confuse, it was an easy way to produce a report from mysql database with PHP Programming.

A lot of people maybe confuse how to Export MySQL Query to excel with PHP. Because we usually learn query, connection, show data and manipulation data first. A reporting is final step if we do a programming of a system development .

We Just need a Connection, a Table that contain MySQL Row and This Great Script ..


header("Content-type: application/vnd.ms-excel");

header("Content-disposition: attachment; filename=backup_ijasah.xls"); // filename
header("Pragma: no-cache");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Expires: 0");


<?php
1.Connection File
2.The Script above
3. The MySQL Table from A PHP MySQL Query : Example just produce like this :

?>


Just add the Highlighting syntax above at the top line of your coding.. (It Can be Under Include Connection.php line).

After you call your File from Web Browser You Wil Get Like This



Well Done You Can Produce an Excel File that Export MySQL Query to excel with PHP.







Komentar FB


Probably Related Article



11 comments:

rumah blogger said...
January 14, 2010 at 6:45 PM

pertamaaxx..

sabirinnet said...
January 14, 2010 at 6:47 PM

mengamankan yang keduaxx

sukses ya mas..

!Rchymera! said...
January 16, 2010 at 5:57 AM

Thanks infonya kawan sangat senang berkunjung disini dan selalu ada yang baru,slm sukses selalu...:D

the international times said...
January 16, 2010 at 11:32 PM

kurang paham dengan bahasa pemograman nih...

sd card said...
March 11, 2010 at 9:53 PM

I was read this article it contain such different information which is really a very interesting for me I like it very much You described it such nicely.

金瓜米粉Jason said...
May 5, 2010 at 7:24 PM

徵信社,尋人,偵探,偵探社,徵才,私家偵探,徵信,徵信社,徵信公司,抓猴,出軌,背叛,婚姻,劈腿,感情,第三者,婚外情,一夜情,小老婆,外遇,市場調查,公平交易法,抓姦,債務,債務協商,應收帳款,詐欺,離婚,監護權,法律諮詢,法律常識,離婚諮詢,錄音,找人,追蹤器,GPS,徵信,徵信公司,尋人,抓姦,外遇,徵信,徵信社,徵信公司,尋人,抓姦,外遇,徵信,徵信社,徵信公司,尋人,抓姦,外遇,徵信,徵信社,徵信公司,尋人,抓姦,外遇,徵信社

Types Of Charts said...
July 7, 2010 at 4:34 AM

really it was very useful and easy trick to export to excel, however i am a new person to this build a site and using PHP,as per your instrcution, i did change db connection, table etc, but i do not know how to link with that " export to excel" word to this file to export to excel, please advise me...

Merchant Capital said...
July 22, 2010 at 4:58 AM

Thanks for explaining this in an easy way, it is really very helpful to export MySQL query to excel with PHP

Estudiar ingles en el extranjero said...
June 20, 2011 at 1:11 AM

Somebody essentially help to make seriously articles I would state. This is the first time I frequented your website page and thus far? I amazed with the research you made to make this particular publish incredible. Great job!

wasim said...
January 28, 2013 at 5:04 AM

The shot by the water (where you got your foot wet) is gorgeous, totally worth nearly falling in the water.. cheap paper writing service

Melisa Marzett said...
January 15, 2016 at 7:20 AM

We offer proofreading service, including dissertation proofreading, of high quality! and this is not a joke! Forward your assignment to one of our experts for a review!

Related Posts by Categories



Widget by