Hi there,
I've got to a sticking point and had a look around on here for an answer, but can't find what I need....
I have got multiple checkboxes on the previous page which I then add separate rows into the database using:
<? $how_many = count($regions);
if ($how_many>0) {
}
for ($i=0; $i<$how_many; $i++) {
$query="INSERT INTO registered (date, GROUP_ID, REGION_ID, email) VALUES (NOW(), '{$_POST['group']}', '$regions[$i]','{$_POST['email']}')";
mysql_query ($query);
}
}
?>
I have also got it adding to a separate table using:
<? $query2= "INSERT INTO companys (company, contact, address, phone, email, date) VALUES ( '$company', '$contact', '$address', '$phone', '$email', NOW())";
mysql_query ($query2);
?>
But I need it to update a third table which holds a number from 0-5 against 'REGION_ID' and 'GROUP_ID', and need it to increase this number by 1 if the region has been chosen.
Sorry its so long, but didn't know how much detail you need 🙂
Thanks,
George