Checkboxes

From: Date: Fri, 14 Mar 2003 04:47:23 +0000
Subject: Checkboxes
Groups: php.general 
Request: Send a blank email to php-general+get-139663@lists.php.net to get a copy of this message
Hi I am trying to get results form checkboxes on a form. Each checkbox is given a value of the id of an item in a table. What I want to do is find out what is selected and from there get the id so I can create a sql insert statement for each selected item. I can get the item selected but not a value. I am using: PHP: if (count($_POST['skill'])>0) { for ($i=0;$i<count($_POST['skill']);$i++){ echo "<li>$fskill[$i]\n"; } } inside a form <input type="checkbox" name="skill[]" value="1"> <input type="checkbox" name="skill[]" value="2"> <input type="checkbox" name="skill[]" value="3"> I get a number of bullets representing the items I check but no value! Thanks, Stephen

« previous php.general (#139663) next »