时间:2021-07-01 10:21:17 帮助过:3人阅读
$ex_sql =mysql_query("Select * from wk_member where m_ip='$ip' and datediff(m_dtime,'$dtime')=0");
if(mysql_num_rows($ex_sql)<5){
$sql;
if(mysql_query($sql)){
$_SESSION['uid']=array(mysql_insert_id(),$uid,$mo);
exit("");
}else{
alert('注册失败!','');
}
}else{
alert('对不起,同IP一天只能注册5个用户','');
}
这样就可以做投票限制IP的程序了,哈哈最后本站原创转载请注明www.111cn.cn/phper/php.html
http://www.bkjia.com/PHPjc/630432.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/630432.htmlTechArticle今天我们来看看限制同IP注册人数代码的代码吧,注要用到datediff 函数哦,很简单的. $ex_sql =mysql_query(Select * from wk_member where m_ip='$ip' and datedi...