tags:

views:

22

answers:

0
<?php 
      if($_POST['Submit']=='Generatexml')
      {
        $tblname=$_GET['genratexml'];

//mysql_connect("localhost","root","");
//mysql_select_db("hitnrunf_db");

global $obj_mysql;

$result = mysql_query("SELECT * FROM tbl_js_login");

while($row = mysql_fetch_array($result)) {
$csv_output .= "$row[fld_id],$row[fld_fname],$row[fld_lname]";
$csv_output .="\015\012";
}

header("Content-type: application/vnd.ms-excel");
header("Content-disposition: csv; filename= Student_Data_". date("Y-m-d") . ".csv");
print $csv_output;
exit;
        }
   include_once $path."includes/jobseeker_form.php";
?>

In the above we are getting html code along wtih id, firstname, lastname columns. we are unable to get the heading of the columns also

How to remove Html code from xls file also need to get headers