Basically i have a csv exprting from my database. If i open excel and import text file it works fine but if i just double click on the csv file i get 2 errors.
No.1 is can't read first record
No.2 is error SYLK, the file format is not valid.
This isn't a problem if i'm using it but for Mr and Mrs Bloggs using this system it would be great if my csv would open first time in excel.
here is my header
<?php
header("Content-Type: application/csv");
header("Cache-control: public");
//header("Content-type: application/octet-stream");
header("Content-Transfer-Encoding: binary");
$EXPORT_TIME=date('dm_Hi');
header("Content-disposition: attachment; filename=export$EXPORT_TIME.csv");
and here is the data that i'm sending to the csv
echo "ID;Title;F_Name;S_Name\r\n";
$result=mysql_query("SELECT * FROM csv_list,people WHERE
csv_list.Person_ID=people.ID ORDER BY people.S_Name, people.F_Name ");
while ($row=mysql_fetch_array($result))
{
echo $row[ID].";".$row[Title].";".$row[F_Name].";".$row[S_Name];
echo "\r\n";
}
thanks,
nozom