mamasita60440
Programmer
I need to display selected data from a mysql database in basic line graphs using php. I am open to using excel but thought I saw something about php having a tool called jgraphs.
To give you a little background info about my application:
1. Users can search the databases by date. They enter a date and press enter.
2. The data is then displayed on a new page based on the date entered.
3. The user can then select which data they want displayed in the line graphs with checkboxes. I am using session variables on this page of code.
4. After the user has checked the rows of data they wish to have displayed in their line graphs they should be able to press the submit button to generate the graphs.
Below is the code for the page where they use the checkboxes to select their data:
<?php session_start();
$_SESSION["ReportData"]=$_POST["ReportData"];
$_SESSION["HandleName"]=$_POST["HandleName"];
$_SESSION["ServerName"]=$_POST["ServerName"];
$_SESSION["LoadName"]=$_POST["LoadName"];
$_SESSION["InstallDate"]=$_POST["InstallDate"];
?>
<form action="insertPfrGraph.xls" method= "post" name="FormName">
<html>
<body>
<table>
<table border='1'>
<tr><th>Handle</th><th>Load</th><th>Server</th><th>Installation Date</th>
</tr>
<?php
foreach ($_POST['ReportData'] as $cbox=>$cboxvalue) {
$HandleName= $_POST["HandleName"][$cbox];
$LoadName= $_POST["LoadName"][$cbox];
$ServerName= $_POST["ServerName"][$cbox];
$InstallDate= $_POST["InstallDate"][$cbox];
echo "<tr><td>".$HandleName."</td>
<td>".$LoadName."</td>
<td>".$ServerName."</td>
<td>".$InstallDate."</td>
</tr>";
}
?>
</table>
<br><br><input type="Submit" value="Display Graphs">
</form>
</body>
</html>
Any help is greatly appreciated. I am not sure how to tackle this. Thanks.
To give you a little background info about my application:
1. Users can search the databases by date. They enter a date and press enter.
2. The data is then displayed on a new page based on the date entered.
3. The user can then select which data they want displayed in the line graphs with checkboxes. I am using session variables on this page of code.
4. After the user has checked the rows of data they wish to have displayed in their line graphs they should be able to press the submit button to generate the graphs.
Below is the code for the page where they use the checkboxes to select their data:
<?php session_start();
$_SESSION["ReportData"]=$_POST["ReportData"];
$_SESSION["HandleName"]=$_POST["HandleName"];
$_SESSION["ServerName"]=$_POST["ServerName"];
$_SESSION["LoadName"]=$_POST["LoadName"];
$_SESSION["InstallDate"]=$_POST["InstallDate"];
?>
<form action="insertPfrGraph.xls" method= "post" name="FormName">
<html>
<body>
<table>
<table border='1'>
<tr><th>Handle</th><th>Load</th><th>Server</th><th>Installation Date</th>
</tr>
<?php
foreach ($_POST['ReportData'] as $cbox=>$cboxvalue) {
$HandleName= $_POST["HandleName"][$cbox];
$LoadName= $_POST["LoadName"][$cbox];
$ServerName= $_POST["ServerName"][$cbox];
$InstallDate= $_POST["InstallDate"][$cbox];
echo "<tr><td>".$HandleName."</td>
<td>".$LoadName."</td>
<td>".$ServerName."</td>
<td>".$InstallDate."</td>
</tr>";
}
?>
</table>
<br><br><input type="Submit" value="Display Graphs">
</form>
</body>
</html>
Any help is greatly appreciated. I am not sure how to tackle this. Thanks.