Hello I have this voting script attached it counts votes by IP address. Please how can I create a kind of time session on the IP addresses. \"say 5 votes a day per IP.
you can add a timestamp column in 'voting_ip' table and set no unique keys.
then you can do the query to get last 5 records.
just subtract the time by latest record and last record
for example:
$times=mysqli_query($bd, "SELECT timestamp FROM voting_ip WHERE mes_id_fk='$id' AND ip_add='$ip' order by timestamp desc limit 5");
if(mysqli_num_rows($ip_sql) < 5 || {first record - last record < 24 hours})
...your codes...