I think your code will help out alot of what im trying to do. I have a flash form that gets data from a user hits a php file and emails the results to me and my boss. But now he wants to keep track of everyone who filled out the form in one excell spread sheet so I am assuming I can just use your code
$content = "Date\tContact Name\tType of contact\tSDC Member\tActual Iforce Issue\tescalated\tEscalated To\tContact Type\tTime Opened\tTime Closed\tTotal Time\tAgent\tNotes\n";
// Get results
while ($row = mysql_fetch_array($retid)) {
$date = $row["date"];
$caller_name = $row["caller_name"];
$caller_category = $row["caller_category"];
$contact_method = $row["contact_method"];
$sdc_member = $row["sdc_member"];
$iforce_issue = $row["iforce_issue"];
$escalated = $row["escalated"];
$escalated_to = $row["escalated_to"];
$time_opened = $row["time_opened"];
$time_closed = $row["time_closed"];
$total_time = $row["total_time"];
$agent = $row["agent"];
$notes = $row["notes"];
$notes = preg_replace("(\r\n|\n|\r)", " ", $notes);
$content = $content . " $date\t$caller_name\t$contact_method\t$sdc_member
t$iforce_issue\t$escalated\t";
$content = $content . " $escalated_to\t$caller_category\t$time_opened\t$ti
me_closed\t$total_time\t$agent\t$notes\n";
}
}
header("Content-type: application/vnd.ms-excel");
header("Content-Disposition: attachment; filename=calls.xls");
echo("$content");
and change the variables, correct? But how would i need to modify the code to open the same excell file that was created by the first user and just keep adding on to that same file each time someone fills out the form?