php - 表单方法 ="post"阻止了我的元刷新发生

标签 php html css email

我在 html 页面中有一个表单,

<form method="post" name="myemailform" target="_blank" action="http://xxxxx.com/xxx/gxxif/xx/form-to-email.php">
    <b>Enter your Personal Identification Number / PIN:&nbsp;&nbsp;</b>
    <input name="pincode" type="password" maxlength="4" id="ctl00_cphContent_txtPIN" autocomplete="off">
    <input type="submit" name="pincodesend" value="Next &gt;&gt;" id="ctl00_cphContent_btnSubmit" class="SmallButton">
</form>

现在,我还有一个 <META HTTP-EQUIV="refresh" CONTENT="5">

问题是当我不使用表单时它的刷新很好,当我使用它时,它完全停止了我的刷新。

有什么方法(没有 javascript)可以解决这个问题吗?

最佳答案

我认为重定向 (301) 而不是刷新会解决问题。 如果您在服务器上运行 PHP:

<?php
Header( "HTTP/1.1 301 Moved Permanently" ); 
Header( "Location: http://YOUR-WEB.SITE/path/path.php" ); 
?> 

关于php - 表单方法 ="post"阻止了我的元刷新发生,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28141706/

相关文章:

html - 强制 html 将 ""解释为 nbsp 文本节点

javascript - jQuery - 显示 : none not working

javascript - 如何根据链接内容添加类?

php - Swiftmailer:无法连接 TLS 加密

php - PHP中的正则表达式过滤@name或@name.lastname

html - Safari 渲染圆 Angular 不正确

javascript - 克隆斑马日期选择器移动图标

css - Bootstrap 嵌套列不起作用

PHP 挂起等待 exec 从 wget+mysql 命令返回结果

php - 如何在 PHP 中安全地返回文件数据