Jump to content

Rating System Timers


supanoob

Recommended Posts

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

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

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.