时间:2021-07-01 10:21:17 帮助过:5人阅读
$value =$_SERVER['HTTP_HOST'];
echo $value;
if(empty($_COOKIE["cook"])){
setcookie("cook", $value, time()+1800, "/");
if(sizeof($_POST)<8){echo 'bb';}
for($i=1;$i<=8;$i++){
$c =$_POST['r'.$i];
switch( intval($c) ){
case 0:
$word ='vote_r1';
break;
case 1:
$word ='vote_r2';
break;
case 2:
$word ='vote_r3';
break;
default:
exit('error');
}
$sql ="update gx_votes set $word=$word+1 where id=$i";
mysql_query($sql) or die(mysql_error());
}
echo 'os';
}else{
print '00';
}
注明:本站原转载请注明www.111cn.cn
http://www.bkjia.com/PHPjc/631374.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/631374.htmlTechArticlecookie用法 今天我们再来看看php cookie用法并会举一个简单的例子来说明.cookie我想不说大多都会明白了,它只是在客户端保存了一个cookie文件...