View unanswered posts | View active topics It is currently Sun Apr 28, 2024 5:42 am



Reply to topic  [ 2 posts ] 
General PHP and pChart question 
Author Message
New pChart user
New pChart user

Joined: Mon Jun 10, 2013 5:58 am
Posts: 1
Post 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


Mon Jun 10, 2013 6:07 am
Profile
New pChart user
New pChart user

Joined: Mon Apr 30, 2012 9:31 am
Posts: 2
Post 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>


Mon Jul 15, 2013 3:05 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 2 posts ] 

Who is online

Users browsing this forum: No registered users and 15 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron