Jump to content

please help!!!


Chronix

Recommended Posts

Hi All, in need of some urgent help as I am completely new to php!!!

 

Im setting up a feedback form-esque type web page that allows you to select from a multiple choice type thing (Lets say 4 options: Yes, Maybe, No, Dont know) and I need some way for a php pie chart to be shown once you answer (on the same page too, not opening a new one).

 

Once this is done and the user has looked at the pie chart, they can then click onto a next page which takes them to a video relating to their selected option (This will be viewed on pcs as well as iPads so no flash videos, all HTML5), for them to then be able to select a new option (from the 4 options previously) whether they have changed their mind from the video or not, for it to then take their answer, and show them a new pie chart (possibly) and then to submit their final answer to a php sql.

 

Any, and I mean ANY help will be greatly appreciated.

 

Many thanks in advance.

 

Charlie

Link to comment
Share on other sites

well, as far as help I know google offers a pie chart api. It looks really nice and it's free.

But what do you have so far?

 

I just checked out the google api pie chart and it doesnt offer (as far as I can see) any way to link to my php database. Unless im missing something, is this even possible? Basically, the aim of the pie chart is to pull stats from a database and display it. I've been looking at ive seen that you can do it in javascript but ive never used javascript before and dont really plan to any time soon as my job doesnt really involve using it.

Link to comment
Share on other sites

the google api doesn't require javascript, you can use it , but you don't have to if your not changing the values as a client in real time.

 

proof: Just disable javascript in your browser and copy paste in your address bar:

http://chart.apis.google.com/chart?
cht=p3&chs=450x200&chd=t:73,13,10,3,1&
chco=80C65A,224499,FF0000&
chl=Chocolate|Puff+Pastry|Cookies|Muffins|Gelato

 

et voila a piechart.

 

You only need to embed the right code within image tags like:

 

<img src="http://chart.apis.google.com/chart?
cht=p3&chs=450x200&chd=t:73,13,10,3,1&
chco=80C65A,224499,FF0000&
chl=Chocolate|Puff+Pastry|Cookies|Muffins|Gelato">

Link to comment
Share on other sites

the google api doesn't require javascript, you can use it , but you don't have to if your not changing the values as a client in real time.

 

proof: Just disable javascript in your browser and copy paste in your address bar:

http://chart.apis.google.com/chart?
cht=p3&chs=450x200&chd=t:73,13,10,3,1&
chco=80C65A,224499,FF0000&
chl=Chocolate|Puff+Pastry|Cookies|Muffins|Gelato

 

et voila a piechart.

 

You only need to embed the right code within image tags like:

 

<img src="http://chart.apis.google.com/chart?
cht=p3&chs=450x200&chd=t:73,13,10,3,1&
chco=80C65A,224499,FF0000&
chl=Chocolate|Puff+Pastry|Cookies|Muffins|Gelato">

 

Hi, thanks for this, didnt realise it was that easy.

 

If you mean that when the client submits their option, it changes the pie chart dynamically each time, thats what I need, I need the pie chart to get the data from the mysql and show it as a pie chart. Im probably going way over my head doing this, but I got good news from my client yesterday saying that it might not be done in HTML 5 now and just flash (screw the apple users ^^) Any hoo, I really appreciate all the feedback you guys have given me and hopefully, once I ge more used to php, I can also give feedback to people in need of help.

 

Many thanks.

 

Charlie

Link to comment
Share on other sites

I recommend you test this. This is not using javascript nor html5 I repeat NO JAVASCRIPT NOR HTML 5

 

Just fetch the data from the database, and if they are in the good manner, you can make charts on the fly

did i already said NO HTML5 or javascript? i think i did

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.