function search_form_submit in Drupal 6
Same name and namespace in other branches
- 4 modules/search.module \search_form_submit()
- 5 modules/search/search.module \search_form_submit()
- 7 modules/search/search.pages.inc \search_form_submit()
Process a search form submission.
File
- modules/
search/ search.pages.inc, line 119 - User page callbacks for the search module.
Code
function search_form_submit($form, &$form_state) {
$keys = $form_state['values']['processed_keys'];
if ($keys == '') {
form_set_error('keys', t('Please enter some keywords.'));
// Fall through to the drupal_goto() call.
}
$type = $form_state['values']['module'] ? $form_state['values']['module'] : 'node';
$form_state['redirect'] = 'search/' . $type . '/' . $keys;
return;
}