Gowthaman, Just at a glance, it seems that you Should Only receive One value.
<input type=\"checkbox\" Name=protid value=\"$variable\"> 'Name=protid' tells me that you have only created one value. Because they ALL have the SAME name="protid" there will be only one value. This would be more evident if they were type=radiobox. What you need is to generate: <input type=\"checkbox\" Name=protid1 value=\"$variable\"> <input type=\"checkbox\" Name=protid2 value=\"$variable\"> <input type=\"checkbox\" Name=protid3 value=\"$variable\"> <input type=\"checkbox\" Name=protid4 value=\"$variable\"> to get separate values. Sorry! That's html. Gowthaman Ramasamy wrote: > In the form i have many checkbox options created dynamically. All of > them have same name but different values. But when user submits the form > i am able to access only the value of last checkbox that user cliked. > Values of rest of the selection is not displayed/passed. How can i get > all the values. > many thanks in advance ... > followings are my scripts ... > > form ........this prints lot of check boxes on the from as per the > result or previous mysql query > ---------------------------------------------------------------- > while ($rows2 = mysql_fetch_array($result2)) > { > echo <input type=\"checkbox\" Name=protid value=\"$variable\"> something > ... > } > > I am trying to access these checkbox values in follwing script ........ > ----------------------------------------------------------------------- > if(isset($_POST['submit'])) > { > echo "hello"; > echo $hell=$_POST['protid']; > echo $counts = count($hell); > } > ?> > counts says there is only one value ....(that is value of last checked > box) I also tried putting $hell=$_POST['protid'] in a while loop .... > did not work. > sincerely > gowtham > -- > Ra. Gowthaman, > Graduate Student, > Bioinformatics Lab, > Malaria Research Group, > ICGEB , New Delhi. > INDIA > > Phone: 91-9811261804 > 91-11-26173184; 91-11-26189360 #extn 314 -- John Taylor-Johnston ----------------------------------------------------------------------------- "If it's not open-source, it's Murphy's Law." ' ' ' Collège de Sherbrooke: ô¿ô http://www.collegesherbrooke.qc.ca/languesmodernes/ - Université de Sherbrooke: http://compcanlit.ca/ 819-569-2064 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php