I've read all the posts here but can't seem to get this to work. All I want is a button or link that will let me save data to .csv or .xls. With what I have now, I expect the save box to auto appear when the page is loaded... yet again, nothing happens. Here is what I have, any help is appreciated.
<?PHP
header( "Content-type: application/vnd.ms-excel" );
include("database.php");
// header( "Content-Disposition: attachment; filename=myoutput.xls" );
?>
<HTML>
<HEAD></HEAD>
<BODY>
<?
print("RECORD NAME<BR>");
$result = mysql_query("select * from test");
while($row = mysql_fetch_array($result)) {
$recordresult = $row["int"];
$nameresult = $row["name"];
print("$recordresult $nameresult<BR>"); }
?>
</BODY>
</HTML>