Database Articles
  Home arrow Database Articles arrow Page 6 - Adding a Poll to Your Web Site
Codewalker Forums 
  Tutorials  
Database Articles  
Miscellaneous  
Navigation Usability  
PEAR Articles  
Programming Basics  
Server Administration  
XML Tutorials  
  Reviews  
Database Book Reviews  
Linux Book Reviews  
Miscellaneous Reviews  
PHP Book Reviews  
PHP Software Reviews  
Server Admin Reviews  
SQL Tool Reviews  
  Code Gallery  
Content Management Code  
Contest Code  
Counters Code  
Database Code  
Date Time Code  
Discussion Board Code  
Email Code  
File Manipulation Code  
GUI Code  
Link Farm Code  
Miscellaneous Code  
Search Code  
Site Navigation Code  
User Management Code  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
Download TestComplete 
Forums Sitemap 
Weekly Newsletter 
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
DATABASE ARTICLES

Adding a Poll to Your Web Site
By: Codewalkers
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 125
    2005-06-29

    Table of Contents:
  • Adding a Poll to Your Web Site
  • Setting the Stage
  • Creating the Form
  • The Complete showvotes.php
  • Expanding the Poll
  • Polling Accuracy

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Adding a Poll to Your Web Site - Polling Accuracy


    (Page 6 of 6 )

    It's a fact: Web poll results are not an accurate reflection of the population at large. First, many people choose not to participate in polls, and there's nothing you can do to change that. Second, some people will try to skew the results by casting multiple votes. There are ways to limit users to one vote, but determined users can get around all of them.

    You can set a cookie whenever a user casts a vote, but there are two problems with this: 1) Some users disable cookies, and 2) Some users regularly clear their cookies. So some people will be unable to vote, while others will be able to vote more than once after clearing their cookies.

    You could also log the IP address of each visitor, and allow only one vote from each address. Once again, there are two problems: 1) Some users share a machine with other users, or have access only through public machines, and 2) Some users have access through multiple IPs, for example, at home and at work. Users with dialup connections may be assigned a different IP address each time they connect. Once again, some users will not be able to participate, and others will still be able to vote more than once.

    You might force users to register their email address and log in before voting. Then you could add another table to the database to track which polls each user has voted. Again, there are two problems: 1) Some users will not want to bother with setting up an account just to vote in a poll or will not want to give out their email address, and 2) Some users will use multiple email addresses to beat the system and vote more than once.

    There's no sure way to keep a determined user from skewing the poll results. So take polls for what they are worth and don't put too much stock in their results. Done right, a poll can be an easy way to let visitors interact with your site, and it's usually more fun than getting bitten by a ferret.

    About the Author

    Bruce Alderman is a Systems Specialist by day and a freelance writer by night, yet he still manages to find time for hobbies like PHP programming. He lives in Wichita, Kansas. He has never been bitten by a ferret, but it's on his list of things to do.

    Acknowledgement

    Thanks to Lawrence Pires for pointing out a couple of errors. They have been fixed. -Ed


    DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.

       · I've written a poll system myself and the method I use for accuracy is through...
       · I think the key word there is community. If you've already got an interactive web...
       · with the number of poll scripts already available for free on scripts site, it would...
       · Everything seems to work nicely, but the graph doesn't show at all. The vote totals...
       · Hey LadieS!
       · Great tutorial.. and I couldn't agree less with the guy who said that it'd be better...
       · Excellent tutorial. Never looked at setting up a poll for my site, but might well...
       · I personally would have thought that using the width attribute of an img tag (src...
       · Where is the content in pdf?Why is the file half done?
       · what is ferret?
       · HiOnline poll is great way . But only concern i have with Poll result. Suppose we...
     

    DATABASE ARTICLES ARTICLES

    - More on Query Optimization for Oracle Databa...
    - Query Optimization in Oracle
    - Clusters and Other Data Structures for Oracle
    - Using Indexes with an Oracle Database
    - The Basics of Data Structures in Oracle
    - Oracle Data Structures
    - Best Practices for PL/SQL Variables
    - What`s Code Without Variables?
    - Clauses, Sorting, and SQL Queries
    - The From Clause and SQL Queries
    - Query Primer
    - Full Text Searches and Strings
    - Searching with Strings
    - Pattern Matching with Strings
    - Working with Cases of Strings





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 4 Hosted by Hostway
    Stay green...Green IT