如何从重定向到另一个 URL 的 FORM 操作获取响应


How to get response from FORM action which redirects to another url

我遇到了一个问题。

请参阅以下示例

<form action="http://url-1.com/action">
------
------
</form>

现在,当表单操作解析变量时,它会重定向到另一个 url,如 http://urls-2.com/confirm.php。请参阅表单操作已发送到 url-1.com/action

由于它重定向到不同的 url,我无法捕获表单操作的响应。任何人都可以帮助提供适当的示例吗?

尝试将以下内容作为"确认.php"页面:

<html>
 <body>
  <?php
   $title = $_POST['title'];  // 'title' is the field name in your form
   $name = $_POST['name'];    // 'name' is the field name in your form
   echo "Hello ". $title . " " . $name . "!<br />";
  ?>
 </body>
</html>