Skip to content

Instantly share code, notes, and snippets.

View alvaroarta's full-sized avatar

Alvaro Artagaveytia alvaroarta

View GitHub Profile
@alvaroarta
alvaroarta / gist:83543d5c2e3cdf01cb31d83548451d85
Last active April 10, 2019 18:14
Export MySQL to Excel using php (mysqli version)
<?php
/*******EDIT LINES 5-10*******/
$DB_Server = "localhost"; //MySQL Server
$DB_Username = "username"; //MySQL Username
$DB_Password = "yourpassword"; //MySQL Password
$DB_DBName = "dbname"; //MySQL Database Name
$DB_TBLName = "tblname"; //MySQL Table Name
$filename = "filename"; //File Name