Ik wil dus checken of een gebruiker genoeg punten heeft om iets te kunnen downloaden (voor vip ook want ik hanteer 2 verschillende prijzen)
Ik heb tot nu toe dit: (dit is uiteraard niet de hele code maar een stukje waar het om gaat)
en het gaat dan voornamelijk om regel 4 beginnend met if... ik heb dit ervan gemaakt maar dit klopt niet, hoe roep je dit wel correct aan?
En is regel 10 goed zo?
Ik heb tot nu toe dit: (dit is uiteraard niet de hele code maar een stukje waar het om gaat)
[COLOR= #0000BB]<?php
$memQuery[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT uId, uCoins, uRang FROM member_accounts WHERE uId = "[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]uId[/COLOR][COLOR= #007700]] .[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700])[/COLOR] or [URL="http://www.php.net/trigger_error"]trigger_error[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]());[/COLOR]
[COLOR= #0000BB]$memFetch[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_assoc"]mysql_fetch_assoc[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$memQuery[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700](([/COLOR]is_auth[COLOR= #007700]([/COLOR][COLOR= #DD0000]2[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]1[/COLOR][COLOR= #007700]) ?[/COLOR] [COLOR= #0000BB]$uFetch[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]vipprijs[/COLOR][COLOR= #007700]] >[/COLOR] [COLOR= #0000BB]$memFetch[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]uCoins[/COLOR][COLOR= #007700]] :[/COLOR] [COLOR= #0000BB]$uFetch[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]prijs[/COLOR][COLOR= #007700]] >[/COLOR] [COLOR= #0000BB]$memFetch[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]uCoins[/COLOR][COLOR= #007700]])
{[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]Download: U heeft niet genoeg punten om dit artikel te downloaden.[/COLOR][COLOR= #007700];
}[/COLOR]
[URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]Download: [/COLOR][COLOR= #007700]. ([/COLOR][URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$uFetch[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]download[/COLOR][COLOR= #007700]]) ==[/COLOR] TRUE [COLOR= #007700]?[/COLOR] [COLOR= #DD0000][/COLOR] [COLOR= #007700]:[/COLOR] [COLOR= #DD0000]<a href="[/COLOR][COLOR= #007700].[/COLOR] [COLOR= #0000BB]$uFetch[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]download[/COLOR][COLOR= #007700]] .[/COLOR][COLOR= #DD0000]">Klik hier</a>[/COLOR][COLOR= #007700]) .[/COLOR][COLOR= #DD0000][/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"UPDATE member_accounts SET uCoins = uCoins - "[/COLOR] [COLOR= #007700]. ([/COLOR]is_auth[COLOR= #007700]([/COLOR][COLOR= #DD0000]2[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]1[/COLOR][COLOR= #007700]) ? .[/COLOR] [COLOR= #0000BB]$uFetch[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]vipprijs[/COLOR][COLOR= #007700]] . : .[/COLOR] [COLOR= #0000BB]$uFetch[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]prijs[/COLOR][COLOR= #007700]] .) .[/COLOR] [COLOR= #DD0000]" WHERE uId ="[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]uId[/COLOR][COLOR= #007700]] .[/COLOR] [COLOR= #DD0000]""[/COLOR] [COLOR= #007700]);
}[/COLOR]
?> en het gaat dan voornamelijk om regel 4 beginnend met if... ik heb dit ervan gemaakt maar dit klopt niet, hoe roep je dit wel correct aan?
En is regel 10 goed zo?
)
Ik zal vanmiddag ff kijken of ik wat kan fixen als nog niemand dat gedaan heeft 

