Export MySQL to Excel Using PHP

Code, Hack on February 22nd, 2012 Comments Off

The code below will export every column name and value from your database into an excel document. Note: Delete the line spaces if you receive a parse error.  PHP |  copy code |? 01<?php02/*******EDIT LINES 3-8*******/03$DB_Server = "localhost"; //MySQL Server 04$DB_Username = "username"; //MySQL Username 05$DB_Password = "password"; //MySQL Password 06$DB_DBName = "databasename"; //MySQL Database Name 07$DB_TBLName = "tablename"; //MySQL [...]

Tags: , , ,