I have been using jpgraph for a little while and it rox!... I am able to dynamically create graphs using this library. However, I am now at a point where I need some help.
This is related to an earlier post located here.
I run a series of queries and put the returned data into variables. I need to pass these variables to jpgraph, but I run into problems.
Here's what I'm talking about.
I send a string of data that is similar to this:
http://server/path/to/jpgraph?datadate=2004-08-01&datadate=2004-08-02&datadate=2004-08-03&...
This could go on up to 365 times, just for the $datadate variable. I have quite a few other variables to pass along with the date. I keep getting apache errors:
"Request URI Too Large"
I googled this error message for a while and it seems that the only solution I could find was to put the data into $POST variables. But the only way to use $POST variables is to put them in a form. This is not what I'm trying to accomplish.
I liked using the $_GET variables because I could call on the jpgraph page without using a form. For example:
foreach ($date as $key => $dates){
$DATADATE .= '&DATADATE' . $key . '=' . $dates;
}
foreach ($bsc as $key => $bscs){
$BSC .= '&bscs' . $key . '=' . $bscs;
}
foreach ($drops as $key => $dropnumber){
$DROPS .= '&DROPS' . $key . '=' . $dropnumber;
}
foreach ($attempts as $key => $attemptsnumber){
$ATTEMPTS .= '&ATTEMPTS' . $key . '=' . $attemptsnumber;
}
foreach ($blocks as $key => $blocksnumber){
$BLOCKS .= '&BLOCKS' . $key . '=' . $blocksnumber;
}
foreach ($volume as $key => $volumenumber){
$VOLUME .= '&VOLUME' . $key . '=' . $volumenumber;
}
foreach ($hoatt as $key => $hoattnumber){
$HOATT .= '&HOATT' . $key . '=' . $hoattnumber;
}
foreach ($hocomp as $key => $hocompnumber){
$HOCOMP .= '&HOCOMP' . $key . '=' . $hocompnumber;
}
foreach ($ihoatt as $key => $ihoattnumber){
$IHOATT .= '&IHOATT' . $key . '=' . $ihoattnumber;
}
foreach ($ihocomp as $key => $ihocompnumber){
$IHOCOMP .= '&IHOCOMP' . $key . '=' . $ihocompnumber;
}
echo '<img src="test.php?' . $DATADATE . $BSC . $DROPS . $ATTEMPTS . $BLOCKS . $VOLUME . $HOATT . $HOCOMP . $IHOATT . $IHOCOMP . '">;
If I had fewer variables, like on my previous pages I could get the chart with no errors.
I have been searching for a way to do this, and I have a few solutions:
1. Create a form with a button that will pass the variables to the jpgraph library using $_POST (not my favorite solution)
2. Use $SESSION variables (once I learn how🙂 )
3. Ask for help here.
Any suggestions would be greatly appreciated.
Thanks in advance.