rashmi_k28 Posted October 14, 2008 Share Posted October 14, 2008 if(isset($_POST["submit_plot"])){ $checklist=$_POST['check_list']; echo "<img src=\"./linegraph.php?v1=$checklist\">"; I have passed the checkbox value to linegraph.php in the image. In Linegraph.php $param=$_REQUEST['v1']; The graph is not plotted. The values passed from the checkbox to linegraph.php should be in the format $param=array('bw','cpu','auser','gs','cnt','rj','mem','pkt','rtt','qj'); Depending on the value checked the $param should form an array. Link to comment https://forums.phpfreaks.com/topic/128352-checkbox-value/ Share on other sites More sharing options...
Zhadus Posted October 14, 2008 Share Posted October 14, 2008 Have you made sure that $checklist is getting the correct values before passing it onto the image file? Link to comment https://forums.phpfreaks.com/topic/128352-checkbox-value/#findComment-664890 Share on other sites More sharing options...
sasa Posted October 14, 2008 Share Posted October 14, 2008 change line echo "<img src=\"./linegraph.php?v1=$checklist\">"; to echo "<img src=\"./linegraph.php?v1=".urlencode(serialize($checklist))."\">"; and in linegraph.php use $v1 = unserialize(urldecode($_GET['v1'])); Link to comment https://forums.phpfreaks.com/topic/128352-checkbox-value/#findComment-665115 Share on other sites More sharing options...
rashmi_k28 Posted October 16, 2008 Author Share Posted October 16, 2008 if(isset($_POST["submit_plot"])){ $checklist=$_POST['check_list']; echo "<img src=\"./linegraph_final.php?v1=$checklist\">"; Here $checklist is a array. In the bottom of the browser shows //filepath?v1=Array How to send the values of the $checklist as array('bw','gs') Link to comment https://forums.phpfreaks.com/topic/128352-checkbox-value/#findComment-666830 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.