user registration redirect for custom form drupal 6 I have worked on a solution which will redirect from the user registration form to my own form. My own form can be reached by typing the website name testweb/my_module/form. Here is the code of my module using a form_alter. When I run the function it doesn't redirect to my own form. Could someone advice me why it is not working?

function redirect_custom_reg_form_alter(&amp;$form, &amp;$form_state, $form_id) {
  if ($form_id == 'user_register') {
    $form_state['redirect'] = 'my_module/form';
  }       
}
It is $form['#redirect'], not $form_state['redirect'] in this case because user_register_submit() unsets $form_state['redirect'] (well, sets it to '') when it is confident that all is good with its part in the registration process...and hence allowing an alter to add in a #redirect.