pChart 2.x forum http://wiki.pchart.net/forum/ |
|
General PHP and pChart question http://wiki.pchart.net/forum/viewtopic.php?f=1&t=39810 |
Page 1 of 1 |
Author: | iYeager [ Mon Jun 10, 2013 6:07 am ] |
Post subject: | General PHP and pChart question |
All, I'm using pChart to plot some relatively simple graphs. In an effort to make the code easier to read, I'm trying to move my .php code into it's own file and call that from my html using <img> tags. I'm trying to pass my variables into the .php file, but I'm having some trouble retrieving the values in the .php script using the $_GET method. I can get it to pass the variable name, but not the variable value. Here is the html code; Code: <td><img src="include/drawLinearChart.php?slope='.$xvar.'&yInt='.yvar.'&chartName='.chartName.'" width="350" height="300" /></td> And the associated PHP code; Code: //Assign arguments to variables $varSlope = $_GET["slope"]; $varY_Intercept = $_GET["yInt"]; $varScaleName = $_GET["chartName"]; So, for example, my $varScaleName variable is getting passed to my scale as '.chartName.' Any help would be appreciated. Thanks, -Ian |
Author: | guillaume57 [ Mon Jul 15, 2013 3:05 pm ] |
Post subject: | Re: General PHP and pChart question |
Hi, try this: <td><img src="include/drawLinearChart.php?slope='.$xvar.'&yInt='.$yvar.'&chartName='.$chartName.'" width="350" height="300" /></td> |
Page 1 of 1 | All times are UTC |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |