Drupal 6 drupal6通过内部重定向提交给第三方站点

Drupal 6 drupal6通过内部重定向提交给第三方站点,drupal-6,drupal-fapi,Drupal 6,Drupal Fapi,我正试图将drupal 6表单PIA提交给第三方站点进行处理,但在提交表单后,我需要重定向到我自己站点中的感谢页面 我读过这篇文章- 但我不知道如何正确设置重定向。 这是我的代码: $form_state['action']='external site.com' $form['redirect']='thankyou.com' 谢谢重定向属性也设置为$form\u状态 $form_state['redirect']='some.com' 确保重定向是最后一步。大概是这样的: function

我正试图将drupal 6表单PIA提交给第三方站点进行处理,但在提交表单后,我需要重定向到我自己站点中的感谢页面

我读过这篇文章-

但我不知道如何正确设置重定向。 这是我的代码:

$form_state['action']='external site.com'

$form['redirect']='thankyou.com'


谢谢

重定向属性也设置为$form\u状态


$form_state['redirect']='some.com'

确保重定向是最后一步。大概是这样的:

function my_module_form {
  $form['#action'] = 'some.external.site';

  # Store the redirect in a value element, maybe we need some data
  # which are passed to the form, like a user ID, node ID etc.
  # So lets store the link in a value element
  $form['redirect_link'] = array(
    '#type'  => 'value',
    '#value' => url('some.redirect.page'),     
  );
}

function my_module_form_validate ($form, &$form_state) {
  # Do some validation stuff...
}

function my_module_form_submit($form, &$form_state) {
  # show some confirmation message...
  drupal_set_message(t('Successfully sent your data into space.'));

  # And finally the redirect...
  # The 'redirect_link' value was passed internally, without being sent
  # to the browser so we can safely use it.
  $form_state['redirect'] = $form_state['values']['redirect_link']
}

因为我只是尝试向第三方发送信息,而不是在表单提交后将页面重定向到第三方站点。 对于这个错误的问题,我得到了正确的答案

这就是我最终使用的对我有用的东西:

$url = 'http://thirdpartyurl';
$headers = array('Content-Type' => 'application/x-www-form-urlencoded');
$data = drupal_query_string_encode($pass_the_form_info);
drupal_http_request($url, $headers, 'POST', $data);

这真是无耻的轻推,因为我仍然需要帮助。我可以将表单正确提交给第三方处理程序,也可以重定向到内部页面,但我仍然无法同时完成这两项工作。我非常感谢你的帮助。谢谢你的回答,经过努力,我意识到我问错了问题,我将接受你的回答,因为这是我发布的问题的正确答案,非常感谢你的帮助!