$lap_number++;
}
- $dbh->commit();
+ if ($dbh->commit()) return $entry;
- return true;
+ return false;
}
function show_leg($station, $start_finish, $station_id, $system_id, $order, $n) {
echo "<p>Entry $entry_id: CMDR <strong>$cmdr_name</strong> flying <strong>$ship_name</strong> in $race_name</p>\n";
echo "<div id=\"plot\"></div>\n";
}
- else if (do_entry($race_id, $ship_id, $posted, $allotted_time)) return true;
+ else {
+ $entry = do_entry($race_id, $ship_id, $posted, $allotted_time);
+ if ($entry) return add_entry($race_id, $ship_id, $entry);
+ return true;
+ }
}
else echo "//--></script>\n";
if (! $entry) {