PHP头条
热点:

限制同IP注册人数代码


今天我们来看看限制同IP注册人数代码的代码吧,注要用到datediff 函数哦,很简单的.

$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("<script>location='registerok.php';</script>");
     }else{
       alert('注册失败!','');
     }
   }else{
    alert('对不起,同IP一天只能注册5个用户','');
   }

这样就可以做投票限制IP的程序了,哈哈最后本站原创转载请注明www.111cn.cn/phper/php.html

www.phpzy.comtrue/php/9395.htmlTechArticle限制同IP注册人数代码 今天我们来看看限制同IP注册人数代码的代码吧,注要用到datediff 函数哦,很简单的. $ex_sql =mysql_query(Select * from wk_member where m_ip='$ip' and datediff(m_dtime,'$dtime')=0); if(my...

相关文章

    暂无相关文章
相关频道:

PHP之友评论

今天推荐