0

how get value button press

how we get button value when press

27th Jul 2016, 3:19 AM
abidin mi
abidin mi - avatar
2 Respostas
0
<form action="#" method="post"> <select name="Color"> <option value="Red">Red</option> <option value="Green">Green</option> <option value="Blue">Blue</option> <option value="Pink">Pink</option> <option value="Yellow">Yellow</option> </select> <input type="submit" name="submit" value="Get Selected Values" /> </form> <?php if(isset($_POST['submit'])){ $selected_val = $_POST['Color']; // Storing Selected Value In Variable echo "You have selected :" .$selected_val; // Displaying Selected Value } ?>
27th Jul 2016, 3:59 AM
SOLEYMAN
SOLEYMAN - avatar
0
if you not include option but just button ext : button1, button2 etc.
27th Jul 2016, 4:01 AM
abidin mi
abidin mi - avatar