<?php
header("Expires: 0");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
header("Content-type: application/vnd.ms-excel;charset:UTF-8");
header("Content-Disposition: attachment; filename=filename.xls");
print "\n"; // Add a line, unless excel error..
$dbhost = 'localhost';
$dbname = 'joomfa';
$dbuser = 'root';
$dbpass = '';
$con=mysql_connect($dbhost, $dbuser, $dbpass) or die(mysql_error());
mysql_select_db($dbname) or die(mysql_error()); //
mysql_query("SET NAMES 'UTF-8'");
$result = mysql_query('select * from jos_dabirkhane_register',$con);
$row = mysql_fetch_assoc($result);
?>
<table border="1">
<tr>
<th>لتالتال</th>
<th>header 2</th>
</tr>
<tr>
<td><?php echo $row['name']; ?></td>
<td>سیبلسیبل</td>
</tr>
</table>