SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    Confirmed Halfwit
    Join Date
    Oct 1999
    Location
    Vancouver, BC, Canada
    Posts
    983
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I have about about 12 different polls all on a "poll page", where users can go and answer them all.

    In an effort to increase participation of the polls, I would like to do a "featured poll" on the main site index page, which would randomly select one of the active polls from the poll page. Then, there would be a link to the poll page for the rest of the polls.

    My question is, how do I randomly select one poll an put it into the main index page? Like most poll type scripts, it uses a php call to display the poll. I was thinking about maybe assigning a number to each poll, and then randomly choosing a number.. would this work? Is there an easier or better way to do this? (Also, what poll software do you all use?)

    Thanks!
    - A simple online WYSIWYG editor for HTML code snippets.
    - Managed Web Hosting - $3.95/month (resellers welcome)
    - Why pay more? $8.95 domains & $9.95 SSL certificates!

  2. #2
    SitePoint Enthusiast Bartimeus's Avatar
    Join Date
    Dec 2000
    Location
    Norway, Trondheim
    Posts
    35
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You should be able to just randomize a number and select a row from your poll database with that number. That would get you a random poll easy and quick.

    As for poll software, i don't use it :P

    Bjarte S Karlsen
    Roleplayer and webdeveloper with a high nerd factor.


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
  •