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

Thread: voting system

  1. #1
    Join Date
    Nov 2006
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Thumbs up voting system

    I want to create voting system on my website. how can i implement it. the logic is if i create some voting system in mysql table and save result in mysql. how can i show that result in graph shape in such a way like

    e.g voting are on five things,

    animal 5 bird 30 fish 30 cars 15 and homes 25 votes
    total vote cast 105


    how can i show this in graph.

    I want to show like

    for animal it shows green bar

    bird shows red bar

    etc.

    hope you will understand the question. any query please feel free to email me.

    any idea how can i get my objective. thanks

    imi

  2. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    http://php-mysql-tutorial.com

    Is that your personal site or spam in your sig?
    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

  3. #3
    Join Date
    Nov 2006
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by djr33 View Post
    http://php-mysql-tutorial.com

    Is that your personal site or spam in your sig?

    Is there something wrong. Because this is my personal site and I am thinking to implement voting system in it.

  4. #4
    Join Date
    Nov 2006
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    http://php-mysql-tutorial.com


    There is nothing about drawing graph using php on this site. am i right

  5. #5
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    Take a look at the following links and see if this is what you are looking for.

    http://dhtmlgoodies.com/index.html?w...pt=ajax-poller

    A Demo:
    http://dhtmlgoodies.com/scripts/ajax...ax-poller.html

    Hope this helps.
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

  6. #6
    Join Date
    Nov 2006
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    this seems to me complicated. I have done all calculation that I got result now in format like

    cars 33.33%, truck 40.13%

    I only want to draw these figure in bars using gd or css.

  7. #7
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    If you are using the script in the link posted above, did the images even show up? If you could, either post a link to where you have placed the script, or send to me via PM or YIM. Maybe there's something missing or whatnot.
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

  8. #8
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    1. There have been recent spam links in signatures soley for the purpose of promoting sites. I find any explicitly commercial site suspiscios. Nothing personal.

    2. The link I gave you will tell you how to use a database. The math is easy... just average stuff. But you need to learn the basics before doing that.

    3. As for creating graphs... I would suggest not doing it. If you MUST, then use PHP's GD library, but don't say I didn't warn you. It's complex and doesn't exactly work right all the time.
    The other option is doing a simple graph, like a bar chart, for which you could use simple elements (divs) and just set the widths dynamically, or something like that.
    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

  9. #9
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    Quote Originally Posted by djr33 View Post
    1. There have been recent spam links in signatures soley for the purpose of promoting sites. I find any explicitly commercial site suspiscios. Nothing personal.
    Was that referring to my sig or imi_99's?

    EDIT: Nevermind, didn't even look at imi's sig
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

  10. #10
    Join Date
    Jul 2006
    Location
    Canada
    Posts
    2,581
    Thanks
    13
    Thanked 28 Times in 28 Posts

    Default

    Obviously not your sig, yours is your site link. Take a look at imi_99's link:
    "free uk car listings"
    - Mike

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
  •