# \[PHP Help\] Array + form checkbox

**URL:** <https://forum.kirupa.com/t/php-help-array-form-checkbox/218129>\
**Category:** programming\
**Created:** [March 5, 2007, 10:17am UTC](https://forum.kirupa.com/t/php-help-array-form-checkbox/218129 "2007-03-05T10:17:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![cjj](https://avatars.discourse-cdn.com/v4/letter/c/ecc23a/32.png) [@cjj](https://forum.kirupa.com/u/cjj)\
**Post date:** [March 5, 2007, 10:17am UTC](https://forum.kirupa.com/t/php-help-array-form-checkbox/218129/1 "2007-03-05T10:17:22Z")

</div>

I’m a little confused with this script I’m busy with. I would really appreciate the help. :thumb:

I created a form with an array from a database. So basically my script is reading a “list” from the database. Each item in the list shows up with a “checkbox” next to it. Each checkbox will have a name($num) which will reflect the corresponding number in the database. I have this sorted and working fine, I think. ha ha.

But what I’m a little unsure about is the next part…the next script. This form will take u to another script called “update.php”. On this script I need to retrieve the info from the last script. I need to determine which list items were checked, so the script can now delete those from the database.

I know I need to do some sort of foreach as $key =\> $value sort of thing, but not sure how to do that.

I would really love some help, please! :):):)🙂
