简体   繁体   中英

How to get the right PHP output on HTML form select tag

Here is the whole PHP-code I use, until

Flug:

everything works fine:

<select id="flight">
    <option value="Wahl" selected="selected">*Wählen Sie einen Flug*</option>
    <option value="Funflug">Funflug</option>
    <option value="Thermikflug">Thermikflug</option>
</select>

and my HTML-code (selcet tag only):

 <select id="flight"> <option value="Wahl" selected="selected">*Wählen Sie einen Flug*</option> <option value="Funflug">Funflug</option> <option value="Thermikflug">Thermikflug</option> </select> 

This is my last try I made on this one. I tried some other ways but it wont get me one of my options selected.

Id doesn't get posted only names try this

 <select name="flight">
    <option value="Wahl" selected="selected">*Wählen Sie einen Flug*</option>
    <option value="Funflug">Funflug</option>
    <option value="Thermikflug">Thermikflug</option>
 </select>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM