Rumah >pembangunan bahagian belakang >tutorial php >求大神帮忙看看错哪了
求大神帮忙看看哪里错了
<br /><br />if (!isset($_SESSION["sn"])){<br />$_SESSION['sn']=0;<br />setcookie('sn',$sn,time()+1);<br /><br /> if($_POST["submit"]){<br /> if($sn=3)<br /> {
alert("抱歉,您已经点击了3次");<br /> location.href="zp.php";
exit();<br /> }<br /> elseif ($sn=="tull")<br /> {
alert("123");<br /> location.href="zp.php";
exit();<br /> }<br /> $newitem=$_POST["zp_user"];<br /> $sql="insert into vote (awards,sn,pnone) values (1,'$sn',1)";<br /> if(mysql_query($sql))<br /> { <br /> $sn==$_SESSION['sn']+1;<br /> <br />}}<br /> if($_POST["submit2"]){<br /> if(empty($_POST['sn']))<br />$_SESSION['zp_user']=$_POST['pnone'];<br />$sql="insert into zp_user values('".($_POST['sn'])."')";<br /> if(mysql_query($sql))<br /> {<br /> <br /> }<br />}}