Adding a redirect to a URL within Drupal's Form API
$query_parameters = drupal_get_query_parameters();
//Check if the specified query paramater key is present in the current URL
if (empty($query_parameters['query_paramater_key'])) {
$form_state['redirect'] = array('node/123',
array('query' => array('foo' => 'bar'),'fragment' => 'baz');
}
NEED A WEBSITE?
Contact me at allan.eldridge@gmail.com and we can talk about what you need.