supanoob Posted September 14, 2008 Share Posted September 14, 2008 Basically im working on a system that allows people to rate other people out of 10. Now what i want to do is limit how many times you can rate any one person per day to 1. for example: Person A Rates Person B They can then no longer rate person B for 24 hours, However they can rate other people if they wish. How could this be done? Link to comment https://forums.phpfreaks.com/topic/124207-rating-system-timers/ Share on other sites More sharing options...
redarrow Posted September 14, 2008 Share Posted September 14, 2008 voted_member id user_id votes date <?php // database connection $sql="select * from members_votes where id='".$ESSION['id']."' "; $result=mysql_fetch($sql) or die(mysql_error()); while($rec=mysql_fetch_assoc($result)){ if ($rec['date'] < date("dmy,his") ){ //insert vote }else{}; } ?> Link to comment https://forums.phpfreaks.com/topic/124207-rating-system-timers/#findComment-641293 Share on other sites More sharing options...
supanoob Posted September 14, 2008 Author Share Posted September 14, 2008 Ill give that a go thanks Link to comment https://forums.phpfreaks.com/topic/124207-rating-system-timers/#findComment-641306 Share on other sites More sharing options...
redarrow Posted September 14, 2008 Share Posted September 14, 2008 example only........ <?php session_start(); // database connection $sql="select * from members_votes where id='".$ESSION['id']."' "; $result=mysql_fetch($sql) or die(mysql_error()); while($rec=mysql_fetch_assoc($result)){ if ($rec['date'] < date("dmy his") ){ //insert vote }else{}; // means do nothink......... } ?> Link to comment https://forums.phpfreaks.com/topic/124207-rating-system-timers/#findComment-641308 Share on other sites More sharing options...
redarrow Posted September 14, 2008 Share Posted September 14, 2008 mysql_query >>>> sorry Link to comment https://forums.phpfreaks.com/topic/124207-rating-system-timers/#findComment-641325 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.