Jump to content

Count Votes with Timer


Ell20

Recommended Posts

Hi,

 

I have been dabbling in PHP/MySQL for a month or two now so I know a little bit about it.

However I have come across something which I am unsure how to do so I was hoping you guys/girls could help me.

 

I am helping a friend run a MMORPG (Online Game) and basically we want our users to vote for our site on gamer websites so that we become more popular. Now we have added ourselves to these voting site we are given a direct link to give to our users to vote.

 

Now I need to:

1) Count the vote when they vote and add it into the database.

2) If they dont vote and they just close the pop up then dont count their vote.

 

I am very unsure on whether number 2 is possible, if its not, would it possible to have a timer, so if they close the window within 3 seconds then they dont get their voted counted?

 

Appreciate any help with this

 

Elliot

Link to comment
Share on other sites

in your pop up insert this

 

<meta http-equiv="refresh" content="6 ; url=javascript:parent.close()">

 

content 6 is the timer i believe represent 10seconds ... but in the pop up if the user doesn't click vote w/ in the alotted time then, poof it's closed

 

have you used php/mysql succefully enough to connect to db and able to access mysql queries?

Link to comment
Share on other sites

Thanks for your answer but I dont want to close the popup on the user.

 

I want them to click the link, then the pop up displays.

 

Then if they close the popup within 3 seconds then allow it, but display a message saying "Vote not counted you need to vote before closing the window"

 

Thanks

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.