The Value Attribute in Selects in PHP
Let's specify the
value attribute for the list items:
<form action="" method="GET">
<select name="test">
<option value="1">item1</option>
<option value="2">item2</option>
<option value="3">item3</option>
</select>
<input type="submit">
</form>
In this case, the value of this attribute will be sent to the server:
<?php
var_dump($_GET['test']); // '1', '2' or '3'
?>
Explain why this approach is more convenient.
Use a dropdown list to ask the user to select their language.