Hello forums
I am currently doing a script to download a .doc file created by php from a mysql table. So far the script is working, however is it possible to make the word document in landscape format. What I am getting right now is in portrait format. here’s what I have:
<?
header("Content-type: application/octet-stream");
header("Content-Disposition: attachment; filename=index.doc");
header("Pragma: no-cache");
header("Expires: 0");
include '../../opendb.php';
$cap="<table align=center border=1><tr><th colspan=\\"3\\">PERSONAL DETAILS
</th></tr>";
$title="<tr><td><b>NAME</b></td><td><b>E-MAIL</b></td><td><b>CITY</b></td></tr>";
$tmp_per_res=mysql_query("select * from sd_record");
while($row=mysql_fetch_array($tmp_per_res,MYSQL_BOTH))
{
$body.="<tr><td>".$row['name']."</td><td>"
.$row['email']."</td><td>"
.$row['city']
."</td></tr>";
}
echo $cap.$title.$body."</table>";
?>
tnx …