Page 1 of 2 12 LastLast
Results 1 to 10 of 17

Thread: poll page

  1. #1
    Join Date
    May 2006
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default poll page

    I'm fairly new to php and mySQL. Being a dog lover, I'm thinking about making a personal website where there's a poll page about America's favorate dogs. This is the idea in my head.

    1. drop down menu for people to select their region, say hawaii or new york.
    2. several text boxes to get people's input as vote on dog kinds
    3. email address
    4. submit button

    After submittion, the names get validated (meaning repeated entries will only count once), email address got recorded into database, and votes get stored into database.

    Don't wanna bore the follks here, I like to have the top five kinds of dogs of america listed as a feedback from the database, so it won't need to be updated often even when the ranking changes. In addition, statistics about top entries could be analyzed in a pie chart.

    AAAaaright, i'm finally over. Now my question is that, am I pretty much looking at serious php and mySQL programming from scratch? I've tried to look into scripts such as phppoll, phpQuestionnaire... which offers execellent poll service, but doesn't do everything I needed, so now I'm at this confusion point of what to do. Any light is going to be appreciated.

    God bless.

  2. #2
    Join Date
    Sep 2004
    Location
    Johannesburg, South Africa
    Posts
    373
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    What you could do is download a cookie to their PC and if they try to go to the data form page make a pop up to say already voted etc. This would not stop them deleting the cookie if you give it a simple name, but it would confuse most people and make the complete process faster, as it would not have to search the complete DB looking for duplicates. Just a suggestion.
    Very Best Rgds, Simonf :cool:
    __________________________________
    My Site | E-Mail Me | RSA Search Engine

  3. #3
    Join Date
    Sep 2004
    Location
    Johannesburg, South Africa
    Posts
    373
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hi

    A free poll script at this url
    Very Best Rgds, Simonf :cool:
    __________________________________
    My Site | E-Mail Me | RSA Search Engine

  4. #4
    Join Date
    May 2006
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks Simon,

    to complete my project though, I need more than just the script provided. Am I looking at serious PHP/mySQL coding from scratch, or I can use partially the code and modify myself.

  5. #5
    Join Date
    May 2006
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by simonf
    What you could do is download a cookie to their PC and if they try to go to the data form page make a pop up to say already voted etc. This would not stop them deleting the cookie if you give it a simple name, but it would confuse most people and make the complete process faster, as it would not have to search the complete DB looking for duplicates. Just a suggestion.
    Sounds good.

    Actually, I'd like them to vote only once on one day, but if they think of some more names some other day, they are welcome to come back and vote tomorrow. So if there anyway to check their email address, and if it's the same one from an earlier input today, then they are prompted not to vote again, or the redirected to a page which says no you can no longer vote.

  6. #6
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,878
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    IP and cookie both, I'd think. Neither are certain measures, but neither should have any adverse effects either.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends franšais | entiendo espa˝ol | t˘i Ýt hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  7. #7
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,162
    Thanks
    263
    Thanked 690 Times in 678 Posts

    Default

    IPs for dialup users rotate, so if you have 20 people from AOL visiting your site, you might end up with one who can't vote because their IP at the time matches what someone else had at the time they voted.


    Logins are the only sure way. Aside from that, IPs are good, but if people wish to cheat, they can go to another computer.

    Remember, you could just put "please don't vote twice"; the people who would honor that will honor using only their computer.
    But the people who wouldn't honor that might use another machine... cheaters will always be cheaters.

    So... if you have a way that it can be gotten around, it's not that much better than just "please don't vote twice".

    Just something to think about.


    Checking the email will only stop stupid users who don't know to put a new email. UNLESS you make them varify by an email sent to them... which is too much work for you and too much for them.
    Also, people (myself included) have multiple email addresses sometimes for this purpose, or signing up for things that will inevitably give them spam at the email they use... so.. use a backup.
    Cheaters, again, can cheat.
    Daniel - Freelance Web Design | <?php?> | <html>| espa˝ol | Deutsch | italiano | portuguŕs | catalÓ | un peu de franšais | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  8. #8
    Join Date
    Sep 2004
    Location
    Johannesburg, South Africa
    Posts
    373
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Actually, I'd like them to vote only once on one day, but if they think of some more names some other day, they are welcome to come back and vote tomorrow. So if there anyway to check their email address, and if it's the same one from an earlier input today, then they are prompted not to vote again, or the redirected to a page which says no you can no longer vote.
    You can date the cookie.. I.E only valid for the day in question!!!
    Very Best Rgds, Simonf :cool:
    __________________________________
    My Site | E-Mail Me | RSA Search Engine

  9. #9
    Join Date
    Sep 2004
    Location
    Johannesburg, South Africa
    Posts
    373
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Something like this:
    /**
    * Sets a Cookie with the given name and value.
    *
    * name Name of the cookie
    * value Value of the cookie
    * [expires] Expiration date of the cookie (default: end of current session)
    * [path] Path where the cookie is valid (default: path of calling document)
    * [domain] Domain where the cookie is valid
    * (default: domain of calling document)
    * [secure] Boolean value indicating if the cookie transmission requires a
    * secure transmission
    */
    function setCookie(name, value, expires, path, domain, secure)
    {
    document.cookie= name + "=" + escape(value) +
    ((expires) ? "; expires=" + expires.toGMTString() : "") +
    ((path) ? "; path=" + path : "") +
    ((domain) ? "; domain=" + domain : "") +
    ((secure) ? "; secure" : "");
    }
    Very Best Rgds, Simonf :cool:
    __________________________________
    My Site | E-Mail Me | RSA Search Engine

  10. #10
    Join Date
    Sep 2004
    Location
    Johannesburg, South Africa
    Posts
    373
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Another example of a cookie that counts Cookie Example
    Very Best Rgds, Simonf :cool:
    __________________________________
    My Site | E-Mail Me | RSA Search Engine

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •