Het volgende script heb ik gemaakt :
Zie voor de uitvoer hier :
www.degoeij.org/~jelmer/form/probleem.php
Zet je de maand op februari is er nix aan de hand en zet hij de combobox ook op februari.
Maar zet je hem op September of Augustus dan gaat hij altijd weer terug naar Januari.
Rara !!
PHP:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
| <? if ($maand == '') $maand = date("m"); if ($jaar == '') $jaar = date("Y"); ?> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body bgcolor="#99CCFF" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"> <form action="<?echo $PHP_SELF; ?>" method="post" name=blabla> <center>Maand : <select name="maand" OnChange="document.blabla.submit()"> <option <? if ($maand==01) echo "selected" ?> value="01">Januari</option> <option <? if ($maand==02) echo "selected" ?> value="02">Februari</option> <option <? if ($maand==03) echo "selected" ?> value="03">Maart</option> <option <? if ($maand==04) echo "selected" ?> value="04">April</option> <option <? if ($maand==05) echo "selected" ?> value="05">Mei</option> <option <? if ($maand==06) echo "selected" ?> value="06">Juni</option> <option <? if ($maand==07) echo "selected" ?> value="07">Juli</option> <option <? if ($maand==08) echo "selected" ?> value="08">Augustus</option> <option <? if ($maand==09) echo "selected" ?> value="09">September</option> <option <? if ($maand==10) echo "selected" ?> value="10">Oktober</option> <option <? if ($maand==11) echo "selected" ?> value="11">November</option> <option <? if ($maand==12) echo "selected" ?> value="12">December</option> </select> Jaar : <select name="jaar" OnChange="document.blabla.submit()"> <option <? if ($jaar==2000) echo "selected" ?> value="2000">2000</option> <option <? if ($jaar==2001) echo "selected" ?> value="2001">2001</option> <option <? if ($jaar==2002) echo "selected" ?> value="2002">2002</option> </select> </center> </form> <? echo $maand; ?> </body> </html> ?> |
Zie voor de uitvoer hier :
www.degoeij.org/~jelmer/form/probleem.php
Zet je de maand op februari is er nix aan de hand en zet hij de combobox ook op februari.
Maar zet je hem op September of Augustus dan gaat hij altijd weer terug naar Januari.
Rara !!
"The shell stopped unexpectedly and Explorer.exe was restarted."