hallo,
Ik doe iets fout met php else, maar wat doe ik fout? want het maakt niet uit wat ik als waarde meegeef hij laat altijd dit zien(hier onder). Hij moet het het altijd weergeven behalfe als ?saldo=1,2,3 of 4.
2,50 ?saldo=1
5,00 ?saldo=2
7,50 ?saldo=3
10,00 ?saldo=4
Ik doe iets fout met php else, maar wat doe ik fout? want het maakt niet uit wat ik als waarde meegeef hij laat altijd dit zien(hier onder). Hij moet het het altijd weergeven behalfe als ?saldo=1,2,3 of 4.
2,50 ?saldo=1
5,00 ?saldo=2
7,50 ?saldo=3
10,00 ?saldo=4
[COLOR= #0000BB]<?php[/COLOR]
[COLOR= #FF8000]//include(../include/_config.php);[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]saldo[/COLOR][COLOR= #007700]] ==[/COLOR] [COLOR= #DD0000]1[/COLOR][COLOR= #007700])
{[/COLOR]
[COLOR= #FF8000]//hier API 2,50[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL][COLOR= #DD0000]"2,50"[/COLOR][COLOR= #007700];
}[/COLOR]
[URL="http://www.php.net/else"]else[/URL]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]saldo[/COLOR][COLOR= #007700]] ==[/COLOR] [COLOR= #DD0000]2[/COLOR][COLOR= #007700])
{[/COLOR]
[COLOR= #FF8000]//hier API 5,00[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL][COLOR= #DD0000]"5,00"[/COLOR][COLOR= #007700];
}[/COLOR]
[URL="http://www.php.net/else"]else[/URL]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]saldo[/COLOR][COLOR= #007700]] ==[/COLOR] [COLOR= #DD0000]3[/COLOR][COLOR= #007700])
{[/COLOR]
[COLOR= #FF8000]//hier API 7.50[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL][COLOR= #DD0000]"7,50"[/COLOR][COLOR= #007700];
}[/COLOR]
[URL="http://www.php.net/else"]else[/URL]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]saldo[/COLOR][COLOR= #007700]] ==[/COLOR] [COLOR= #DD0000]4[/COLOR][COLOR= #007700])
{[/COLOR]
[COLOR= #FF8000]//hier API 10,00[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL][COLOR= #DD0000]"10,00"[/COLOR][COLOR= #007700];
}[/COLOR]
[URL="http://www.php.net/else"]else[/URL]
[URL="http://www.php.net/echo"]echo[/URL][COLOR= #DD0000]"2,50 ?saldo=1 </br>"[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL][COLOR= #DD0000]"5,00 ?saldo=2 </br>"[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL][COLOR= #DD0000]"7,50 ?saldo=3 </br>"[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL][COLOR= #DD0000]"10,00 ?saldo=4 </br>"[/COLOR][COLOR= #007700];[/COLOR]
?> 