// include function files for this application require_once("book_sc_fns.php"); session_start(); do_html_header("Adding a candidate"); if (check_admin_user()) { // if (filled_out($HTTP_POST_VARS)) // { // reg_gbl 4112 $newcode = $_POST['newcode']; $firstname = $_POST['firstname']; $lastname = $_POST['lastname']; $catid = $_POST['catid']; $raceid = $_POST['raceid']; $sex = $_POST['sex']; $email = $_POST['email']; $school = $_POST['school']; $phdearned = $_POST['phdearned']; $phdfields = $_POST['phdfields']; $letters = $_POST['letters']; $respaper = $_POST['respaper']; $homepage = $_POST['homepage']; $curposn = $_POST['curposn']; $dateMod = $_POST['dateMod']; if(insert_book($firstname, $lastname, $catid, $raceid, $sex, $email, $school, $phdearned, $phdfields, $letters, $respaper, $homepage, $curposn, $dateMod)) echo "
Candidate $firstname $lastname was added to the database.
"; else echo "Candidate $firstname $lastname could not be added to the database.
"; // } // else // echo "You have not filled out the form. Please try again."; do_html_url("admin.php", "Back to administration menu"); } else echo "You are not authorised to view this page."; do_html_footer(); ?>