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. Quote 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? Quote 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'])); Quote 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') Quote Link to comment https://forums.phpfreaks.com/topic/128352-checkbox-value/#findComment-666830 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.