03-07-2013, 01:13 PM
I found a problem with this script, the cookie's expiry date is set to infinity which is unacceptable by most servers, I don't know why, and it will cause an issue to display the result instantly on screen, the loading icon keep running forever but nothing happens. If anyone is having this issue, just open the file vote.php and find the line at 11
setcookie('poll_'.$poll_id, 1, time() * (60 * 60 * 5),'/');
and replace with this
setcookie('poll_'.$poll_id, 1, time() + (60 * 60 * 24 * 365),'/');
I set my cookie expires in 1 year, you may probably want it longer.
Hope this help
setcookie('poll_'.$poll_id, 1, time() * (60 * 60 * 5),'/');
and replace with this
setcookie('poll_'.$poll_id, 1, time() + (60 * 60 * 24 * 365),'/');
I set my cookie expires in 1 year, you may probably want it longer.
Hope this help