后,我有HTML表单,当点击提交后,提交表单数据发送到同一php page.But我们刷新页面网页浏览器显示重新提交dialog.How它的停止形态在页面刷新时提交。提交HTML表单如何停止形式resubmision当页面刷新
我的HTML代码:index.php文件
If you don't like this colors you can suggest it from here by selecting or copy and paste
PHP代码(同一页):的index.php
if (isset($_POST["btnSubmit"])) {
$c1 = isset($_POST['color1']) ? $_POST['color1'] : '';
$c2 = isset($_POST['color2']) ? $_POST['color2'] : '';
//and do some task here
}
?>
2014-03-28
Elshan
+0
我觉得同样的问题:http://stackoverflow.com/questions/19346762/how-to-prevent-page-redirection-refresh-after-form-submit-while-preserving-file –
+0
我的表单操作本身。 –
+1
使用PHP头位置 –