function hook_submit

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)

59 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_courses_list_filter_form_submit in modules/admin/admin.courses.inc
admin_degrees_list_filter_form_submit in modules/admin/admin.degrees.inc

... See full list

File

includes/hook.api.php, line 422
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"]);
}