depends on the complexity of the data, and whether you expect to be able to manipulate it online
If the importand information is a static table of information its a piece of cake
have the script that creates the report output it to a .csv file, with the correct name (same name every day)
a php script to display the datafile as a table
<!-- other html -->
<table border="0" cellpadding="0" cellspacing="1">
<?php $row = 1;
$handle = fopen("dailyreport.csv", "r");
while (($data = fgetcsv($handle, 1000, ",")) !== FALSE) {
$num = count($data);
$row++;
if ($row == 2) {
echo "<thead>\n<tr>\n";
for ($c=0; $c < $num; $c++) { echo "<th >" . $data[$c] . "</th>\n"; }
echo "</tr>\n</thead>\n<tbody>";
}
else {
echo "<tr>\n";
for ($c=0; $c < $num; $c++) {
echo "<td>" . $data[$c] . "</td>\n";
}
echo "</tr>\n";
}
}
fclose($handle); ?>
</tbody>
</table>
<!--other html -->
crappy code, but it runs
file upload scripts abound, the script above requires the upload script uploads "dailyreport.csv" to the same folder
security is not considered, but should be in any production version
almostbob
Posting Sensei
3,149 posts since Jan 2009
Reputation Points: 571
Solved Threads: 376