'', 'name' => '', 'email' => '', 'phone' => '', 'address' => '', 'notes' => '' ]; $editing = false; if (!empty($VARS['id']) && !is_empty($VARS['id'])) { if ($database->has('customers', ['customerid' => $VARS['id']])) { $editing = true; $custdata = $database->get( 'customers', [ 'customerid (id)', 'name', 'email', 'phone', 'address', 'notes' ], [ 'customerid' => $VARS['id'] ]); } else { // customer id is invalid, redirect to a version of the page that won't // cause an error when pressing Save header('Location: app.php?page=editcustomer'); } } ?>

"" . htmlspecialchars($custdata['name']) . ""]); ?>