ashishrathore Posted January 13, 2006 Share Posted January 13, 2006 hi,i want to know thathow to retrieve checkbox values from a form to anoter pagefor eg this is the code 4 me.......................................................................................................................<?php $mainh = 0; $subh = 0; $clines = file('temp.txt'); foreach ($clines as $cln) { ////foreach STARTS $data = explode(";",$cln); $length = count($data); ?> <input type=checkbox name="main[]" value="<?php echo "$mainh"; ?>"><?php echo "$data[0]"; ?><br> <?php for($j=1;$j<$length-2;$j++) { //////for starts $sub = $data[$j]; $subname = $mainh.$j; ?> <input type=checkbox name="sub[]" value="<?php echo "$subname"; ?>"><?php echo "$sub"; ?><br> <?php } /////////////////////////////////////////// for ends ?> Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now