Spelmaffia schreef:ja
Zou je de de hele pagina kunnen posten, inclusief het stuk waarbij je verbinding maakt (naja zonder gebruikersnaam en wachtwoord dan hea^^)
En probeer dit is?
Spoiler tonen
[COLOR= #0000BB]<?[/COLOR]
[COLOR= #FF8000]//} else {
//if($get_userdata[toegang] == 1){
//mysql_query[/COLOR]
[URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"UPDATE users SET credits = credits+70 WHERE id = "[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]] .[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700])[/COLOR] or [URL="http://www.php.net/die"]die[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]());[/COLOR][URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<div id="succes">Je hebt er nu 70 credits bij! <a href="index.php"></a></div>[/COLOR][COLOR= #007700];[/COLOR]
[COLOR= #FF8000]//} else {
//Je hebt geen toegang meer omdat je meer dan 1 keer wou inloggen
//mysql_query("UPDATE codes SET toegang = 0 WHERE code = ".$_GET[code]." "); } } [/COLOR]
?>Probeer dan deze is. werkt dit dan zit de fout ergens in het gedeelte dat je niet hebt gepost.
Spoiler tonen
[COLOR= #0000BB]<?[/COLOR]
[COLOR= #007700]}[/COLOR] [URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$get_userdata[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]toegang[/COLOR][COLOR= #007700]] ==[/COLOR] [COLOR= #0000BB]1[/COLOR][COLOR= #007700]){[/COLOR]
[COLOR= #FF8000]//mysql_query[/COLOR]
[URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"UPDATE users SET credits = credits+70 WHERE id = "[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]] .[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700])[/COLOR] or [URL="http://www.php.net/die"]die[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]());[/COLOR][URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<div id="succes">Je hebt er nu 70 credits bij! <a href="index.php"></a></div>[/COLOR][COLOR= #007700];
}[/COLOR] [URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]
Je hebt geen toegang meer omdat je meer dan [COLOR= #0000BB]1[/COLOR] keer wou inloggen
[URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"UPDATE codes SET toegang = 0 WHERE code = "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]code[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]" "[/COLOR][COLOR= #007700]); } }[/COLOR]
?>