1
I am currently developing a small (one-page) module which allows users to view scientific data from our database. The guts of the module is just one index.php and one template. The php file checks to see if there are any variables in $_POST and will return a form if it's empty. The user can then select if they want to download the data (the index.php then starts the download and exits, leaving the user at the same page) or display the data in the page (the data are sent to a smarty variable and some foreach loops in the template put them into a table) with the form below the data, to facilitate more queries.
My question is this: I would also like to be able to plot the data using jpgraph. How can I get a similar setup with a plot, i.e. click on Submit and the same page returns, but now it has a plot at the top of it. I suppose I could make a url that includes get variables (
http://...?a=b& etc.), but I can't see how to not include it everytime. Creating a dynamic image when it's not needed seems like unnecessary processor usage to me.
Does anyone see a better way to do this? I'm sure there's some relatively simple way, but my knowledge of XOOPS and php is relatively simple at the moment, too
![](https://xoops.org/uploads/smil3dbd4d6422f04.gif)
.