Welcome Guest, Not a member yet? Register   Sign In
Timing and feedback
#1

[eluser]_Smilie_[/eluser]
Hi,
On my site I have a voting system, so the user clicks on an image which links to a new site, where the user is required to fill some information.
Right, so as soon as the vote is done (the submission on the external site is filled), i want my own site to record it, and set a timer so that he cannot vote for another 12 hours, and execute another php function that updates user points.

So my questions are:
How to handle the timer and how to deal with the post-back required.
As for the timer, I could probably imagine that CI session would suite my needs. Not sure about post-back. Any thoughts?
#2

[eluser]Stefan Hueg[/eluser]
Are both sites (the one with the images and the voting page) inside of the same CI installation or are they completely seperate?

If thats the case you will have to get a callback from the external page that voting has been done.

Regarding the timer issue using sessions is one solution, but you could also combine it with a database table where you store the IP address of the user and a timestamp of the last vote.




Theme © iAndrew 2016 - Forum software by © MyBB