⊗ppPmFmSlAV 312 of 447 menu

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.

English
AfrikaansAzərbaycanБългарскиবাংলাБеларускаяČeštinaDanskDeutschΕλληνικάEspañolEestiSuomiFrançaisहिन्दीMagyarՀայերենIndonesiaItaliano日本語ქართულიҚазақ한국어КыргызчаLietuviųLatviešuМакедонскиMelayuမြန်မာNederlandsNorskPolskiPortuguêsRomânăРусскийසිංහලSlovenčinaSlovenščinaShqipСрпскиSrpskiSvenskaKiswahiliТоҷикӣไทยTürkmenTürkçeЎзбекOʻzbekTiếng Việt
We use cookies for website operation, analytics, and personalization. Data processing is carried out in accordance with the Privacy Policy.
accept all customize decline