Sending values from select option to database

[php]Client Bank

<?php echo $client_bank;?>
<?php
$sqll = “SELECT * FROM client_bank”;
$sql_run = mysqli_query($connect,$sqll);
if(mysqli_num_rows($sql_run)){

			while($row = mysqli_fetch_assoc($sql_run)){
		?>	
                       <?php $option ?> = <option value = "<?php echo $row['bank_name'] . $row['bank_address']  .  " swiftcode: " . 
                                        $row['swift_code']  .  "Bin no:  "  . $row['bin_no']; ?>"><?php echo $row['bank_name'];?></option>	
                      <?php		
				echo $option;
				};
			};
					
					

		?>

				
				
	</select><br>[/php]

I have selected all data from table client_bank and showing them using loop as a drop down select.
Now my problem is i want to send all the the values in the option value using post to another table invoice_bank having the same exact columns names. Now the problem is all these data in the option value is represented by one input name client_bank, how do i send all the 4 data seperately which are present in the option value, I am sorry if my way of asking is wrong i am new to this

Hasn’t this been asked and answered elsewhere on the web?

The answer is no, you don’t want to submit multiple values for any choice, and store them in a second table.

You would instead just submit the id (auto-increment column) value from the first table and then store that id in the second table to relate the data back to the first defining table.

Sponsor our Newsletter | Privacy Policy | Terms of Service