Code 1 :
Code 2
Hoe kan ik ervoor zorgen dat als De toegangscode corect is hij met een else of iets anders Code 2 uitvoert?
[COLOR= #0000BB]<?php
$toegangscode[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"toegangscode"[/COLOR][COLOR= #007700]]) ==[/COLOR] true [COLOR= #007700]?[/COLOR] [COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"toegangscode"[/COLOR][COLOR= #007700]] :[/COLOR] [COLOR= #DD0000][/COLOR][COLOR= #007700];[/COLOR]
[COLOR= #0000BB]$url[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"http://www.mollie.nl/partners/api/micropayment/"[/COLOR][COLOR= #007700].[/COLOR]
[COLOR= #DD0000]"?toegangscode="[/COLOR][COLOR= #007700].[/COLOR][URL="http://www.php.net/urlencode"]urlencode[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$toegangscode[/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #0000BB]$result[/COLOR] [COLOR= #007700]= @[/COLOR][URL="http://www.php.net/implode"]implode[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700],[/COLOR][URL="http://www.php.net/file"]file[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$url[/COLOR][COLOR= #007700]));[/COLOR]
[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$result[/COLOR] [COLOR= #007700]!=[/COLOR] [COLOR= #DD0000]"OK"[/COLOR][COLOR= #007700])[/COLOR]
[URL="http://www.php.net/die"]die[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"<center><strong><br />Je toegangscode was verkeerd of je hebt nog niet betaald. </strong></center>"[/COLOR][COLOR= #007700]);[/COLOR]
?> Code 2
[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"UPDATE Gebruikers SET points = points + 10 WHERE username = "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]username[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]" LIMIT 1"[/COLOR][COLOR= #007700]);[/COLOR]
?> Hoe kan ik ervoor zorgen dat als De toegangscode corect is hij met een else of iets anders Code 2 uitvoert?