how to get the select name in form submit in php code example
Example: php get option value
<?php
if(isset($_POST['submit'])){
if(!empty($_POST['Fruit'])) {
$selected = $_POST['Fruit'];
echo 'You have chosen: ' . $selected;
} else {
echo 'Please select the value.';
}
}
?>