if (!isset ($_session["SN"])) {$_session[' sn ']=0;setcookie (' sn ', $SN, Time () +1); if ($_post["submit"]) {if ($sn =3) {
Alert ("Sorry, you have clicked 3 times"); location.href= "zp.php";
Exit ();} ElseIf ($SN = = "Tull") {
Alert ("123"); location.href= "zp.php";
Exit ();} $newitem =$_post["Zp_user"]; $sql = "INSERT into vote (Awards,sn,pnone) VALUES (1, ' $sn ', 1)"; if (mysql_query ($sql)) { $SN ==$_session[' sn ']+1;}} if ($_post["Submit2"]) {if (Empty ($_post[' sn ')) $_session[' Zp_user ']=$_post[' Pnone ']; $sql = "INSERT INTO Zp_user VALUES (' ". ( $_post[' SN '). "')"; if (mysql_query ($sql)) {}}}
Reply to discussion (solution)
if (mysql_query ($sql))
{
$SN ==$_session[' sn ']+1;
}
Why use = =?
The code is all separate, so it's hard to see ...
if ($_post["submit"]) {
if ($SN =3)
should be = =
if ($_post["submit"]) {
if ($SN =3)//= =
{
= is a value assignment
= = If condition is used to judge