'', 'locname' => '', 'loccode' => '', 'locinfo' => '' ]; $editing = false; if (!empty($VARS['id'])) { if ($database->has('locations', ['locid' => $VARS['id']])) { $editing = true; $locdata = $database->select( 'locations', [ 'locid', 'locname', 'loccode', 'locinfo' ], [ 'locid' => $VARS['id'] ])[0]; } else { // cat id is invalid, redirect to a page that won't cause an error when pressing Save header('Location: app.php?page=editloc'); } } ?>

build("editing location", ['loc' => "" . htmlspecialchars($locdata['locname']) . ""]); ?> get("Adding new location"); ?>

" required="required" value="" />
" />