it worked a little bit...
include('conn.php');
$result = mysql_query("SELECT * FROM ph,customers WHERE ph_cust_id=cust_id AND ph_proj_id=$proj_id");
header("Content-type: application/vnd.ms-excel");
header("Content-Disposition: attachment; filename=\"filename.csv\"");
header("Pragma: no-cache");
header("Expires: 0");
while($row = mysql_fetch_array($result)) {
$line = "\"" . $row["cust_comp"] . "\";\"" . $row["cust_id"] . "\";\"" . $row["cust_fname"] . "\"\r\n";
echo("$line");
}
almost there...works...but...i'm losing my formatting and i'm not sure why...
if i look at the source all the formatting is there...but when i open it in excel the "" around cust_comp are gone but then all the other formatting follows...meaning, each row of data falls into the first cell...???
i'll keep going with this...thanks...v