SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    VICTORY IS MINE! luchazard's Avatar
    Join Date
    May 2001
    Location
    USA
    Posts
    229
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Writing a PHP Voting Script

    Hey Everyone,

    I'm so happy it is the weekend, and memorial weekend at that

    Anyway here is my question...

    I am looking for a PHP voting script that I can use on my website. There are hundreds of such scripts yet all are in a similar format:

    There is a list of possible answers with radio boxes next to them, the user votes and the results are displayed graphically or in html format.

    What I'm looking for is different, and I'll explain it below:

    I run a site with hundreds of jokes and pictures. Under each picture and joke I want to have a voting system that works like this:

    1) A pull down box where people can vote on a scale of 1-10
    2) The current average vote displayed next to the pull down box.
    3) After the user votes the page then re-loads and the average vote for that picture or joke is updated.

    Here is an Example

    If you look under the picture there is a pull down box and also the average vote is displayed - This is exactly what I want.

    I would assume that this is an easy script to write compared to a regular voting script. Yet I have no idea on how to start...

    I would need to make a database first? Because there will be hundreds of jokes and pictures voted on, and each joke's and picture's vote will need to be called into the page and displayed under the joke or picture. For instance if a person wanted to see the first joke the URL would probably look like this:

    site.com/joke/1.php

    The joke would be displayed and the PHP part would call the current average rating into the page.

    As you can see I am very new to PHP I started a few days ago reading online tutorials. I probably am wrong about everthing I said So any direction on how to start would be great, if a script like this doesn't already exist. I really need some guidence for this lareg undertaking.

    Thanks for any help!

  2. #2
    SitePoint Wizard johnn's Avatar
    Join Date
    Mar 2001
    Location
    Southern California, USA
    Posts
    1,181
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I hope this article maybe helpful to you.
    Democracy - the php way

    John

  3. #3
    We like music. weirdbeardmt's Avatar
    Join Date
    May 2001
    Location
    Channel Islands Girth: Footlong
    Posts
    5,882
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Considering the size of the task, you might try

    www.sslinks.com

    They have a neat databased voting/rating script...


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
  •