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