PHPlot

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
hybmg57
Forum Newbie
Posts: 1
Joined: Mon Apr 12, 2010 2:41 pm

PHPlot

Post by hybmg57 »

Hi, I am having a real issue with this for weeks now. Basically my php webpage has img linked to my phplot PieChart.php which displays in image format. I have set some form variables to be linked to Pie_Chart.php so that it picks up the variables from my main php file. This has not happened as passed variables are never recognised and basically comes up as NULL.
Below are my codes...

Main PHP:
<form name="form2" action="Pie_Chart.php" method="GET" id="form2">
<input type="hidden" name="Annual_Expenses" value="<?php $Annual_Expenses ?>" />
<input type="hidden" name="Mortgage_Interest" value="<?php $Mortgage_Interest ?>" />
<input type='submit' name='Calculate' id="Calculate" />
</form>

Pie_Chart.php:
<?php


//Include the code
include('phplot.php');
//Define the object
$graph =& new PHPlot(350,200);
$graph->SetPlotType("pie");
$legend = array();


//Define some data
$data = array(
array('a',$_GET,$_GET['Mortgage_Interest'],5526.09,12000,2805.48) ); $graph->SetDataValues($data); $graph->SetLegendPixels(1,5,false); $graph->SetLegend($legend); //Draw it $graph->DrawGraph(); ?> Anyone have any ideas? If anyone could give me a workable solution, I would highly appreciate your work!!! Thank you very much!!! :)
Post Reply