Hey All,
I have a rather difficult situation to figure out and im completely stumped.
I have a form that has checkboxes, but the number of checkboxes is dependant on the number of fields in the database, so its completely dynamic, one time there could be 6 and the next only 1.
What i have to do is when that form gets submitted, i have to collect the values of the checkboxes that are checked and assign them a unique variable name and then insert the checkbox value to that variable.
So on the first page i have the following in a while loop
<input type="checkbox" name="QuoteSelect[<?= $extrarow['bundle_id'] ?>]" value="<?= $extrarow['bundle_id'] ?>" />
I dont really know where to go on the submittion page though, i have the following, but it doesnt allow me to add up home many checked boxes there were, then assign that many variable names and insert the checkbox value into those variable names.
$i=0;
foreach($_REQUEST['QuoteSelect'] as $Quoting) {
$i++;
echo $Quoting;
}
I really stuck ... if someone could pleaseeeeee help me,
What i really want in the end is, say they checked 5 out of the 8 boxes that were there, on the next page i want say 5 different variable names with the bundle_id in each, so:
$var1 = bundle_id1
$var2 = bundle_id2
$var3 = bundle_id3
$var4 = bundle_id4
$var5 = bundle_id5
Any help would be greatly appreciateed 🙂
Thanks