Hi Professionals
I am stuck here trying to retrieve some values and update the DB
I have a dynamic drop down box that is created within my loop on the first page like so
<select name="<?php echo "dropdown[" .$c ."]" ?>" id="<?php echo $data[$c] ?>" ><?php echo "<option value='y'>Keep Existing</option>"; echo "<option value='n'>Ignore</option>"; echo "<option value='tick'>Cleanse</option>"; ?></select>
When I click view source I get
<select name="dropdown[0]" id="SoftwareManufacturer" ><option value='y'>Keep Existing</option><option value='n'>Ignore</option><option value='tick'>Cleanse</option></select>
I can pull the name out no problem, but what I am looking for is to retrieve the ID as that is my actual db column name so I would need to update that column in the DB. for instance if
the dropdown name = y then
update db set (ID of the dropdown to something)
hope this makes sense
foreach ($_POST['dropdown'] as $numcolumns=>$downboxValue) { if($downboxValue === 'y') /*This is set to KEEP EXISTING so we need to keep this spreadshet column */ { echo "this is a y" .$downboxvalue; } elseif($downboxValue === 'n') /*This is set to IGNORE so we need to drop this spreadshet column */ { echo "this is a n" .$downboxvalue; } else /*This is set to a TICK so we need to cleanse this db value */ { echo "this is a tick" .$downboxvalue; } }