<form action="" method="post">
<select name="Color">
<option value="Red">myRed</option>
<option value="Green">myGreen</option>
<option value="Blue">myBlue</option>
<option value="Pink">myPink</option>
<option value="Yellow">myYellow</option>
</select>
<input type="submit" name="submit" value="Get Selected Values" />
</form>
<?php
if(! empty($_POST["submit"])){
$selected_val = $_POST["Color"];
echo "You have selected : " .$selected_val;
}
myPink
click
You have selected : Pink
what I need now is to display the value of the tag corresponding to the option I selected, that is,
wants to output
You have selected: myPink
excuse me, is there any php available to do this?