Gossamer Forum
Home : General : Perl Programming :

sql+cookie+php

Quote Reply
sql+cookie+php
I have a webpage that place a cookie with an id, name and emailadress. This cookie will chech the sql-table, and update an counter on that page if the id is the same as in the cookie.

I might have a competition where the user that gets the most pageviews, wins a price.

But I want to prevent that the user push refresh to mutch, and I thought I could use some kind of compare of timestamps. Like: if ((timestamp1-timestamp2)>4 minutes ))
{
update.....
}
Else
do not update....

How may I do this in with cookies, mysql and php3?
Quote Reply
Re: sql+cookie+php In reply to
save the timestamp to the cookie or to the database.