# URGENT! HTML form/PHP problem

**URL:** <https://forum.kirupa.com/t/urgent-html-form-php-problem/220521>\
**Category:** Uncategorized\
**Created:** [March 27, 2007, 3:07am UTC](https://forum.kirupa.com/t/urgent-html-form-php-problem/220521 "2007-03-27T03:07:05Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ya3](https://avatars.discourse-cdn.com/v4/letter/y/e95f7d/32.png) [@ya3](https://forum.kirupa.com/u/ya3)\
**Post date:** [March 27, 2007, 3:07am UTC](https://forum.kirupa.com/t/urgent-html-form-php-problem/220521/1 "2007-03-27T03:07:05Z")

</div>

Okay, so basically, I have a whole heap of checkboxes. The name/id for each checkbox is just a random number.

I have them set up in a form, which submits the data to a PHP file.

In the PHP file, I need it to take the data from every single checkbox and do something with it… So I need some kind of loop like this:

Code:

// let ‘$checkboxnumber’ be the name/id of the each checkbox  
// and ‘$checkboxvalue’ be the value of each one

LOOP:  
echo “$checkboxnumber - $checkboxvalue”

Haha… ok… very primitive… But I basically need a loop to go through every single checkbox sent to the PHP page (via POST) and do stuff to it (in this example, just ECHO. but i’ll be entering them into a MySQL DB).

HELP??
