Chronix Posted March 11, 2011 Share Posted March 11, 2011 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 Quote Link to comment Share on other sites More sharing options...
cssfreakie Posted March 11, 2011 Share Posted March 11, 2011 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? Quote Link to comment Share on other sites More sharing options...
stsleeper94 Posted March 11, 2011 Share Posted March 11, 2011 What are you using to make your website? Is it completely from scratch or are you using a CMS builder like wordpress or something like that? Quote Link to comment Share on other sites More sharing options...
Mahngiel Posted March 11, 2011 Share Posted March 11, 2011 wait... the ipad doesn't play flash? Quote Link to comment Share on other sites More sharing options...
Chronix Posted March 15, 2011 Author Share Posted March 15, 2011 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. Quote Link to comment Share on other sites More sharing options...
cssfreakie Posted March 15, 2011 Share Posted March 15, 2011 well i think you just skipped the 5th linked at google with the keywords "how to use google chart api" this is the result, complete with 5 examples on how to use it. Hope it helps you: http://psychopyko.com/tutorial/how-to-use-google-charts/ Cssfreakie Quote Link to comment Share on other sites More sharing options...
spaceman12 Posted March 15, 2011 Share Posted March 15, 2011 it requires ajax and jquery for certain. It aint so easy,..unless u hire some freelancer to do it for u. I could also do that but i'm too engrosed in the development of a project atm. Quote Link to comment Share on other sites More sharing options...
cssfreakie Posted March 15, 2011 Share Posted March 15, 2011 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"> Quote Link to comment Share on other sites More sharing options...
Chronix Posted March 16, 2011 Author Share Posted March 16, 2011 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 Quote Link to comment Share on other sites More sharing options...
cssfreakie Posted March 16, 2011 Share Posted March 16, 2011 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.