php $HTTP_COOKIE_VARS 实例投票资料限制
程序员文章站
2022-05-07 15:13:55
...
alert('您已经投过票了,请不要重复投票');history.back();"; exit; } $vcount = $_post["vcount"]; $lld = $_post["jump"]; $tys = $_post["tys"]; if (!$vcount) { echo ""; exit; } $db = @mysql_connect("localhost", "root", "root") or die("数据库教程连接失败"); mysql_select_db("vote", $db); if ($vcount && $lld) { if ($tys == "1") { $sql = "update vote set vcount=vcount+1 where id=$vcount"; $result = mysql_query($sql, $db); setcookie("vote", "vote", time() + 3600); echo ""; } else { for ($i = 0; $i alert('投票成功!');location.href='vote.php?id=$lld';"; } } ?>
教程链接:
随意转载~但请保留教程地址★