A user can only vote once per year. $uvote is a timestamp(12) datatype. I was thinking $today=time();$uvote=$today;
Does $nextyr=$uvote+1year? How do you handle this with code?
You can also do it from within PHP. Since PHP's time() function returns an integer representation of the date in seconds since 1970-01-01 00:00:00, you can add 31536000 (365 * 24 * 60 * 60) to it to calculate a date for next year. If you need to turn the integer into a string, PHP's function date() (
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.