function hook_submit
Search API
Handle submissions from the Form API
Like hook_validate, this function (if it exists) is called after you submit a form, and after the validation completes without errors. This is where you should act on the submission, confident that it has passed validation, and the values in $form_state are in the final state.
See also
hook_validate($form, &$form_state)
25 functions implement hook_submit()
Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.
- admin_add_degree_form_submit in modules/
admin/ admin.degrees.inc - Submit handler for the add_degree_form.
- admin_apply_draft_changes_form_submit in modules/
admin/ admin.module - Handles the actual moving of draft courses into production.
- admin_copy_degree_form_submit in modules/
admin/ admin.degrees.inc - admin_duplicate_year_form_submit in modules/
admin/ admin.module - This function should perform the actual copy of data!
- admin_edit_course_form_submit in modules/
admin/ admin.courses.inc
File
- includes/
hook.api.php, line 125 - Lists all available hooks within FlightPath's core code.
Code
function hook_submit($form, &$form_state) {
$values = $form_state ["values"];
db_query("INSERT INTO example (f_name) ('?') ", $values ["name"]);
}