View Single Post
  #4  
Old 04-26-2008, 07:43 PM
Watdaflip's Avatar
Watdaflip Watdaflip is offline
Brigadier General
 
Join Date: Sep 2005
Location: Cincinnati, Ohio
Posts: 1,643
Default Re: put a check box inside of a table

Basically you just set the name of each check box to be... for instance "customer[]", which makes it into an array. Set the value of each check box to be the row number in the database table.

Once submitted you just have to loop through the posted variable as an array, ie

PHP Code:
$count count($_POST['customer']);
for(
$i=0$i $count$i++)
{
// do whatever to each customer id
// each is will be $_POST['customer'][$i]

Of course you will want to verify all posted data is safe.

If you need any more explanation I will try to go more in depth or write you an example
__________________

Register/Login Script
Do you use a Password Protected Directory? Need a way to allow users to make their own account, try my .htaccess Login Script
Reply With Quote