将php发布一次,显示页面给用户

时间:2019-01-27 23:58:55

标签: php html

因此在index.php中:

 <form align="center" action="send.php" method="post">
 address:<input type="text" name="address"/><br>
  <input  id="submit" type="submit" name="submit" value="">
   </form>

我想在用户单击“提交”时重定向到send2.php

if (isset($_POST['submit'])) 
{
  $_POST['address'];


}

header("location: send2.php"); 
exit;

和send2.php返回index.php 当用户再次单击提交时,我想将他重定向到此而不是send2.php。

header('Location: http://mywebsite.com/ptc/?failed=1');

仅24小时。之后,当用户单击“提交”时,我希望他重定向到send.php 拜托,我想在我仍在学习中为我写代码

1 个答案:

答案 0 :(得分:0)

您可以通过保存用户的IP地址以及send2.php页面的访问时间来使用数据库。还有一些您可能要考虑的cookie。

相关问题