I have the following database consisted from the following fields.
**table_choice**
field_choiceid(auto increment) (1, 2, 3, 4, 5)
field_choicename (C1, C2, C3, C4, C5)
field_choicemaximumslot (10, 12, 15, 18, 20)
**table_select**
field_selectedid(auto increment)
field_selectedchoice
field_selectedby
**table_full_choice**
field_fullid(auto increment)
field_choiceid_full
field_choicename_full
field_choicemaximumslot_full
**table_full_select**
field_selectedid_full(auto increment)
field_selectedchoice_full
field_selectedby_full
And I'm using this code to auto-populate my dropdown list.
<label>CHOICE</label>
<select value="" name="choice" id="choice" required>
<option>SELECT</option>
<?php
$result=mysqli_query($connection,"SELECT * FROM table_choice")or die(mysqli_error,());
while($row=mysqli_fetch_array($result)){
$choiceid=$row['field_choiceid'];
$choicename=$row['field_choicename'];
$choiceslot=$row['field_choiceslot'];
?>
<option value="<?php echo $choicename;?>">
<?php echo $choicename;?>
</option>
<?php } ?>
</select>
If C1, C3, C5 reached their maximum slot. So I would like to hide C1, C3, C5 in the dropdown list that is auto-populated and insert the data of C1, C3, C5 from table_choice to table_full_choice and insert the data of C1, C3, C5 from table_select to table_full_select then delete the data of C1, C2, C3 in the table_choice and table_select. How to do that? Please help. I'm a noob. I'm a newbie. The this will be the data in the table
table_choice
field_choiceid(auto increment) (2, 4)
field_choicename (C2, C4)
field_choicemaximumslot (12, 18)
table_select
field_selectedid(auto increment)
field_selectedchoice
field_selectedby
table_full_choice
field_fullid(auto increment) (1, 2, 3)
field_choiceid_full (1, 3, 5)
field_choicename_full (C1, C3, C5)
field_choicemaximumslot_full (10, 15, 20)
table_full_select
field_selectedid_full (1 to 45)
field_selectedchoice_full (C1(10 times), C3(15 times), C5(20 times))
field_selectedby_full (Person1 to Person45)