// DB Conneter // $host = "hazel2.db.9577410.hostedresource.com"; $sql_id = "hazel2"; $sql_pass = "aaaAAA123"; $sql_db = "hazel2"; $mc = mysql_connect($host, $sql_id, $sql_pass); mysql_select_db($sql_db, $mc); $query2 = "select * from PRODUCTS ORDER BY TITLE,ARTIST ASC"; $data2 = mysql_query($query2); // make Excel file // $today = date("Y-m-d"); header( "Content-type: application/vnd.ms-excel" ); header( "Content-Disposition: attachment; filename=". $today. ".xls"); header( "Content-Description: PHP4 Generated Data" ); ?>
No. | Title | Artist | Format | File name |
= $no ?> | =$title ?> | =$artist ?> | =$format ?> | = $no ?>.zip |