clinton4
Medlem
Hei,
Hvorfor blir ikke selected satt på måned 08 og 09 her!?
Hvorfor blir ikke selected satt på måned 08 og 09 her!?
PHP:
<form name="form" method="post" action="">
<select name="month" id="month">
<option value="01"<?php if($_POST['month'] == 01){ echo " selected='selected'"; } ?>>Januar</option>
<option value="02"<?php if($_POST['month'] == 02){ echo " selected='selected'"; } ?>>Februar</option>
<option value="03"<?php if($_POST['month'] == 03){ echo " selected='selected'"; } ?>>Mars</option>
<option value="04"<?php if($_POST['month'] == 04){ echo " selected='selected'"; } ?>>April</option>
<option value="05"<?php if($_POST['month'] == 05){ echo " selected='selected'"; } ?>>Mai</option>
<option value="06"<?php if($_POST['month'] == 06){ echo " selected='selected'"; } ?>>Juni</option>
<option value="07"<?php if($_POST['month'] == 07){ echo " selected='selected'"; } ?>>Juli</option>
<option value="08"<?php if($_POST['month'] == 08){ echo " selected='selected'"; } ?>>August</option>
<option value="09"<?php if($_POST['month'] == 09){ echo " selected='selected'"; } ?>>September</option>
<option value="10"<?php if($_POST['month'] == 10){ echo " selected='selected'"; } ?>>Oktober</option>
<option value="11"<?php if($_POST['month'] == 11){ echo " selected='selected'"; } ?>>November</option>
<option value="12"<?php if($_POST['month'] == 12){ echo " selected='selected'"; } ?>>Desember</option>
</select>
<input type="submit" name="button" id="button" value="Submit">
</form>
