php - Vote 5 time from cookie -
i need allow vote cookie 5 times. set ip db can't do, because people sit down in network same remote adress.
one time check this:
if( $dif_cookies == 1 ) //from db if($_cookie["m_questioning3-$external_id"] == $external_id) { $q_show_status = 3; } but need allow 5 times, how? give thanks you
dear haroldas,
if(!isset($_cookie["m_questioning3-$external_id"])){ $_cookie["m_questioning3-$external_id"]["count"] = 1; }else{ $_cookie["m_questioning3-$external_id"]["count"]++; } if($_cookie["m_questioning3-$external_id"]["count"]<=5){ work } it work. please check it.
php mysql
No comments:
Post a Comment