i'm building a dynamic pic chart generator in php / ajax
i'm using GD for drawing arcs and printing values.
Problem is that I believe i'm bound to use GET parameter since the only way to re-draw an image is to change an img src=''
My image tag looks like this :
(fear not the %5B%5D, it means []. i'm using an array parameter)
Code: Select all
<img src='./pie_draw.php?c%5B%5D=000000&v%5B%5D=25&c%5B%5D=FFFFFF&v%5B%5D=75' alt='bla' />
c[]=000000
v[]=25
c[]=FFFFFF
v[]=75
c = color hex code
v = % value
Now in pie_draw.php
I parse the parameter and draw 25% of the pie chart in black and 75% in white.
I'm using AJAX to allow using buttons to increase or decrease one element's value and draw a new pie chart accordingly without reloading the page.
Thing is I might want to add labels and size parameters later on..
So a GET parameter won't be enough as i'll get above the 255 allowed chars
Do you see an other way I could re-draw a picture, using alot of params without reloading the page?