By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,566 Members | 1,794 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,566 IT Pros & Developers. It's quick & easy.

JGraph

P: 33
hi...anyone got ideas on the jgraph?actually everything goes well at first but after I add the drop down list code for selection to sort the graph based on year, the graph didn't show in the same page??anyone know how to solve this problem??

part of the code...

Expand|Select|Wrap|Line Numbers
  1. <form name="list_year" method="post" action="bargraph.php"> 
  2.     <img src="http://bytes.com/submit/image/Search-icon.gif" width="40" height="40" title="Search"/>
  3.         <select name="year" id="year" onchange="document.list_year.submit()"><option> -- select -- </option>
  4.         <?php 
  5.             $sql = "SELECT DISTINCT yearFROM user ORDER BY year ASC";
  6.             $result = mysql_query($sql); 
  7.  
  8.             while($row=mysql_fetch_array($result, MYSQL_ASSOC))
  9.             {
  10.                 echo '<option value="'.$row['year'].'">'.$row['year'].'</option>';
  11.             }
  12.        ?>
  13.         </select>
  14.             </form> 
  15.  
  16.       <p align="center"><img src="bargraph.php"></p>
  17. <input name="image" type="image" src="../image/print.png" width="50" height="50" title="Print" onClick="window.print()" alt="submit button"/>
  18.  
thanks in advance.
Apr 25 '10 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.