Hi there!
Nope, not a dropdown where you can choose more than one. Its a dropdown per product - so that number always changes.
See, for each boiler model (which is assigned an id:
<input id="boiler1" class="field text medium" name="boilermodel[<?=$row_boiler['id']?>]" style='width:250px' tabindex="19" type="text" maxlength="255" value="<?=$row_boiler['boiler_model']?>" /> </td>
and its checkbox is checked for accept, its added to mysql table with an "accept" in the field of each product that was accecepted.
The elseif is for the rejection. Within this elseif I need to run through all the reject checkboxes and if they are checked:
elseif ( isset( $_POST['uncheckbox_boiler'][$boilerkey] ) )
I have it adding a "reject" to the table that the product is in. I also need it to go through each dropdown with the rejection reason and update that in the table as well.
$unit_count_new=0;
foreach( $_POST['boilermodel'] as $boilerkey=>$boilermodel )
{
if( isset( $_POST['checkbox_boiler'][$boilerkey] ) )
{
$sql = "
UPDATE
contractor_boiler_form
SET
boiler_model='$boilermodel',
boiler_serial_no='".$_POST['boilerserial'][$boilerkey]."',
status='accept'
WHERE
id=" . $boilerkey
;
mysql_query( $sql );
$unit_count_new+=1;
}
elseif ( isset( $_POST['uncheckbox_boiler'][$boilerkey] ) )
{
$boiler_reason=$_POST['dropdownboiler'];
$sql = "
UPDATE
contractor_boiler_form
SET
status='reject',
reason='$boiler_reason'
WHERE
id=" . $boilerkey
;
mysql_query( $sql );
}
}