这是我的代码:
<input type="submit" name="send" class="do__order" value="order" >
现在,我想在提交表单数据后将提交的内容重定向到我选择的任何页面,我该怎么做?
将以下行添加到脚本中:
header('Location: http://www.example.com/');
您可以在进行检查的页面上尝试类似的东西。假设这是check.php
if(isset($_POST['send'])){
header('Location: somewhere.php');
}
并且您还需要在form
标签中添加一个method
属性,在这种情况下,它将是 post
,因此method="post"
和action
将是action="check.php"
.