export data as excel format from php mysql

<?php
$file
="marksreport".$_POST["txtfromdate"].".xls";


header('Content-Type: text/html'); 

header("Content-type: application/x-msexcel"); 

//tried adding  charset='utf-8' into header

header("Content-Disposition: attachment; filename=$file"); ?>


copy and paste into header in page 

export to excel from project

Comments

Popular posts from this blog

Call PHP Function In JavaScript Using Ajax

List of Post Category Wise in wordpress