ClioSport.net

Register a free account today to become a member!
Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

  • When you purchase through links on our site, we may earn an affiliate commission. Read more here.

Website design, online poll



Designing a simple website for my 5 a side team, website mostly done, I just want to add a simple "poll system" where a user votes for their man of the match. Whats the best way to go about this and too make sure they can only vote once, without the need to a register and login. Maybe PHP? Any good tutorials?

Cheers,

Darren
 

sn00p

ClioSport Club Member
  A blue one.
I don't see how you're going to do this easily/robustly without a user system in place.

You could use cookies, but that'd be easily gotton around by clearing cookies.

IP based, what if 2 players use the same pc to vote, wouldn't be able to - could vote multiple times by changing pc etc.
 
  306 TD Slut
this an a good idea, i am currently writing a website for my sunday league team. a voting system for man of the match would be a wicked extra!

sorry i cant help tho, as i would also like to know

i have seen on some sites like www.brusheezy.com you can rate a photoshop brush with a star rating, without a login.

p.s, and it only lets you vote once, which i assume is using cookies.

something like this in their source code, not sure where the php/javascript/whatever is tho

Code:
<ul class='star-rating'>   
<li class='current-rating' style='width:62.5px;'></li>    <li>
<a href='/brush/424?vote=1' title='1 star out of 5' class='one-star'>1</a></li>    <li>
<a href='/brush/424?vote=2' title='2 stars out of 5' class='two-stars'>2</a></li>    <li>
<a href='/brush/424?vote=3' title='3 stars out of 5' class='three-stars'>3</a></li>    <li>
<a href='/brush/424?vote=4' title='4 stars out of 5' class='four-stars'>4</a></li>    <li>
<a href='/brush/424?vote=5' title='5 stars out of 5' class='five-stars'>5</a></li>  
</ul>
 
Last edited:
Ok,

Ive created login systems in php before. So If I was to create a login system, then when the user is logged in they can cast "one vote", how would I go about doing this? Also they vote once a week, so obviously I dont want them to only ever make one vote.

Cheers
 
  R26
Code the url for each pole differently. For example:

Poll 1:
dave - url: vote.php?poll=1&vote=dave
alan - url: vote.php?poll=1&vote=alan

Poll 2:
dave - url: vote.php?poll=2&vote=dave
alan - url: vote.php?poll=2&vote=alan

Neater ways of doing it but you get the idea.

Alternatively you can use a form and radio buttons (like this forum) and send it off to a php function which handles the data differently depending on the poll.

-Jas.
 


Top