// Are we done yet? $done = $_POST["done"]; if ($done == "no") { // No, so let's display all the entries belonging to this date. $date = $_POST["date"]; $dry->build_header("Generate Trip Report"); ?> <h1>Generate Trip Report</h1> <div id="content"> <p class="warning">Please select the entries you want to include in this trip report</p> <?php $res = $e->FindEntries(null, $date); if ($res != false) { $dry->build_trg_table_header(); while ($row = $res->fetch_assoc()) { $dry->build_trg_table_row($row); } $dry->build_trg_table_footer(); } echo "</div>"; $dry->build_links(); $dry->build_footer(); } else { if ($done == "yes") { $included = $_POST["included"]; // All included entries IDs $included = array_reverse($included); // Reverse because we want them ascending $dry->build_header("Trip Report"); ?> <h1>Trip Report</h1>