> 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!
What is $fskill? Did you forget to update your code? echo "<li>{$_POST['skill'][$i]}</li>\n"; ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php