PHP Polling

He has: 1,380 posts

Joined: Feb 2002

Hi, I've been building a voting engine, and I cant figure out how I can make the results visual.

You can see the working product at dscpool.com/v2 ....on the right hand side the "current poll"

Thanks

KarenArt's picture

She has: 354 posts

Joined: May 2001

When I voted I got:
Voting Results

Yes:**0/2
No:**2/2
Maybe:**1/2

Something's showing up, but the numbers do seem a little... funny.

How do you have it posting to and reading from your db?

gotta finish redesigning my sites so I can show them again.

The purpose of education is... to get more jokes!

He has: 1,380 posts

Joined: Feb 2002

Oops that math is my fault...but what I am looking for is a graphical representation

KarenArt's picture

She has: 354 posts

Joined: May 2001

You are wanting to create a graph from the voting results then?

There are some scripts at http://www.hotscripts.com/PHP/Scripts_and_Programs/Graphs_and_Charts/ that can create charts and graphs using php.

Would any of these do what you want?

gotta finish redesigning my sites so I can show them again.

The purpose of education is... to get more jokes!

He has: 1,380 posts

Joined: Feb 2002

Yeah, but I'm wanting to create my own...for ease of use, customization, and to better my understanding of PHP (I'm all about doing it my way!)

I guess my question is...how do I create graphics on the fly such as a bar graph using PHP?

KarenArt's picture

She has: 354 posts

Joined: May 2001

teammatt3's picture

He has: 2,102 posts

Joined: Sep 2003

I know nothing about php but you could download a script similar to the one you are trying to make, look at the code and see what you have to do

He has: 1,380 posts

Joined: Feb 2002

Wow that does help, but now I'm thinking maybe stick to plain text display...lol

KarenArt's picture

She has: 354 posts

Joined: May 2001

Quote: now I'm thinking maybe stick to plain text display

Laughing out loud

If you don't want to mess with creating png images or going through the GD library, here are a couple of scripts to try:
http://www.gerd-tentler.de/tools/phpgraphs/
http://tech.hostforadollar.com/index.php?op=articulos&task=verart&aid=15

You could do as teammatt3 suggested and download the scripts, take them apart and see what makes them run. Laughing out loud

gotta finish redesigning my sites so I can show them again.

The purpose of education is... to get more jokes!

He has: 1,380 posts

Joined: Feb 2002

ok, thanks

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.