<form name=form1 method=”POST” action=”/” target=_blank>
<p>
<input type=”text” name=”T1″ size=”20″>
<input type=”button” value=”提交” onclick=”javascript:{this.disabled=true;document.form1.submit();}”>
</p>
</form>
<?php
session_start();
if(isset($_POST[‘code'])) {
if($_POST[‘code'] == $_SESSION[‘code']){
// 重复提交表单了
}else{
$_SESSION[‘code'] =$_POST[‘code']; //存储code
}
}?>
if(isset($_POST[‘submit'])){
setcookie(“tempcookie”,””,time()+30);
header(“Location:”.$_SERVER[PHP_SELF]);exit();
}
if(isset($_COOKIE[“tempcookie”])){
setcookie(“tempcookie”,””,0);echo “您已经提交过表单”;
}
if (isset($_POST[‘submit'])) {
header(‘location:success.php');//处理数据后,转向到其他页面
}
if (isset($_POST[‘action']) && $_POST[‘action'] == ‘submitted') {
//处理数据,如插入数据后,立即转向到其他页面
header('location:submits_success.php');
}
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有