How do I include ? and = in a form redirection? I have a form and I would like to take the value from it, and use it as input for a page view which is created using exposed filters.
I have created a submit handler for my first form. I then redirect to the page view. The challenge is that I want to include search keys in the redirection. I can't figure out how to get this to work because the characters ? and = are converted.

I have created this function.

function my_module_my_button_submit($form, &amp;$form_state) {
  $url = 'some-path/search?keys=' . check_plain($form_state['values']['input']);
  $form_state['redirect'] = $url;
}


The URL that is created from this is 'http://site/some-path/search%3Fkeys%3Dtest'; the URL I want is 'http://site/some-path/search?keys=test'.
In Drupal 6, instead of setting `$form_state['redirect'] with a string, you set it with an array with tree items.

$form_state['redirect'] = array('some-path/search', 'keys=' . check_plain($form_state['values']['input']), '');


The last item would be a value used as anchor. As in your case you don't need it, pass an empty string.