[PHP] Unexpected "}"

Gestart doorPotloodjes7 reacties45 weergaven

8 berichten · pagina 1 van 1

Potloodjes

Lid · Topicstarter

Berichten
2.399
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Hallo,

Ik heb een stukje code maar, ik krijg steeds de error

Unexpected "}" ... on line 36
Maar ik kan de fout maar niet vinden!

Hier de code:

[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/include"]include[/URL] [COLOR= #007700]([/COLOR][COLOR= #DD0000]"config.php"[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/define"]define[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]TITLE[/COLOR][COLOR= #007700],[/COLOR][COLOR= #DD0000]Geef credits[/COLOR][COLOR= #007700]);[/COLOR]
layoutboven[COLOR= #007700]();[/COLOR]
checklogin[COLOR= #007700]();[/COLOR]
[COLOR= #0000BB]$uQuery[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM leden WHERE naam = "[/COLOR] [COLOR= #007700].[/COLOR] [URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]login[/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]
[COLOR= #0000BB]$uFetch[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_assoc"]mysql_fetch_assoc[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$uQuery[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$uFetch[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]status[/COLOR][COLOR= #007700]] ==[/COLOR] [COLOR= #DD0000]"2"[/COLOR][COLOR= #007700]){[/COLOR]

[COLOR= #0000BB]$khQuery[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM leden WHERE naam = "[/COLOR] [COLOR= #007700].[/COLOR] [URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/stripslashes"]stripslashes[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]naamcr[/COLOR][COLOR= #007700]])) .[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #0000BB]$khTel[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$khQuery[/COLOR][COLOR= #007700]);[/COLOR]

[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]submit[/COLOR][COLOR= #007700]])){[/COLOR]

    [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]naamcr[/COLOR][COLOR= #007700]])){[/COLOR][URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]Je hebt geen naam ingevuld![/COLOR][COLOR= #007700];}[/COLOR]
    [URL="http://www.php.net/elseif"]elseif[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]aantalcr[/COLOR][COLOR= #007700]])){[/COLOR][URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]Je hebt geen aantal credits ingevuld![/COLOR][COLOR= #007700];}[/COLOR]
    [URL="http://www.php.net/elseif"]elseif[/URL][COLOR= #007700](![/COLOR][URL="http://www.php.net/ctype_digit"]ctype_digit[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]aantalcr[/COLOR][COLOR= #007700]])){[/COLOR][URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]Je moet wel een getal invullen![/COLOR][COLOR= #007700];}[/COLOR]
    [URL="http://www.php.net/elseif"]elseif[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$khTel[/COLOR] [COLOR= #007700]==[/COLOR] [COLOR= #0000BB]0[/COLOR][COLOR= #007700]){[/COLOR][URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000][/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]naam[/COLOR][COLOR= #007700]].[/COLOR] [COLOR= #DD0000] bestaat niet![/COLOR][COLOR= #007700];}
    }[/COLOR][URL="http://www.php.net/else"]else[/URL][COLOR= #007700]{[/COLOR]
    [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"UPDATE leden SET munten="[/COLOR][COLOR= #007700].[/COLOR][URL="http://www.php.net/stripslashes"]stripslashes[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]aantalcr[/COLOR][COLOR= #007700]]).[/COLOR][COLOR= #DD0000]", WHERE naam = "[/COLOR] [COLOR= #007700].[/COLOR] [URL="http://www.php.net/stripslashes"]stripslashes[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]naamcr[/COLOR][COLOR= #007700]]) .[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700]);
    }
    
}[/COLOR][URL="http://www.php.net/else"]else[/URL][COLOR= #007700]{[/COLOR]

?>
<h1>Geef gebruiker credits:</h1>
<form action="" method="post" name="submit">
    Naam:<br>
    <input name="naamcr" type="text"><br>
    Aantal credits:<br>
    <input name="aantalcr" type="text"><br>
    <input name="submit" type="submit" value="Geef credits!">
</form>
[COLOR= #0000BB]<?php[/COLOR]
[COLOR= #007700]}
}[/COLOR][URL="http://www.php.net/else"]else[/URL][COLOR= #007700]{[/COLOR]

    error[COLOR= #007700]([/COLOR][COLOR= #DD0000]red[/COLOR][COLOR= #007700],[/COLOR][COLOR= #DD0000]Je beschikt niet de rechten om deze pagina te bekijken[/COLOR][COLOR= #007700]);
    
}[/COLOR]

layoutonder[COLOR= #007700]();[/COLOR]
?>


kan iemand helpen?wink
0
Berichten
5.957
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/include"]include[/URL] [COLOR= #007700]([/COLOR][COLOR= #DD0000]"config.php"[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/define"]define[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]TITLE[/COLOR][COLOR= #007700],[/COLOR][COLOR= #DD0000]Geef credits[/COLOR][COLOR= #007700]);[/COLOR]
layoutboven[COLOR= #007700]();[/COLOR]
checklogin[COLOR= #007700]();[/COLOR]
[COLOR= #0000BB]$uQuery[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM leden WHERE naam = "[/COLOR] [COLOR= #007700].[/COLOR] [URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]login[/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]
[COLOR= #0000BB]$uFetch[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_assoc"]mysql_fetch_assoc[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$uQuery[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$uFetch[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]status[/COLOR][COLOR= #007700]] ==[/COLOR] [COLOR= #DD0000]"2"[/COLOR][COLOR= #007700]){[/COLOR]

[COLOR= #0000BB]$khQuery[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM leden WHERE naam = "[/COLOR] [COLOR= #007700].[/COLOR] [URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/stripslashes"]stripslashes[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]naamcr[/COLOR][COLOR= #007700]])) .[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #0000BB]$khTel[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$khQuery[/COLOR][COLOR= #007700]);[/COLOR]

[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]submit[/COLOR][COLOR= #007700]])){[/COLOR]

    [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]naamcr[/COLOR][COLOR= #007700]])){[/COLOR][URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]Je hebt geen naam ingevuld![/COLOR][COLOR= #007700];}[/COLOR]
    [URL="http://www.php.net/elseif"]elseif[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]aantalcr[/COLOR][COLOR= #007700]])){[/COLOR][URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]Je hebt geen aantal credits ingevuld![/COLOR][COLOR= #007700];}[/COLOR]
    [URL="http://www.php.net/elseif"]elseif[/URL][COLOR= #007700](![/COLOR][URL="http://www.php.net/ctype_digit"]ctype_digit[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]aantalcr[/COLOR][COLOR= #007700]])){[/COLOR][URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]Je moet wel een getal invullen![/COLOR][COLOR= #007700];}[/COLOR]
    [URL="http://www.php.net/elseif"]elseif[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$khTel[/COLOR] [COLOR= #007700]==[/COLOR] [COLOR= #0000BB]0[/COLOR][COLOR= #007700]){[/COLOR][URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000][/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]naam[/COLOR][COLOR= #007700]].[/COLOR] [COLOR= #DD0000] bestaat niet![/COLOR][COLOR= #007700];}[/COLOR]
    [URL="http://www.php.net/else"]else[/URL][COLOR= #007700]{[/COLOR]
    [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"UPDATE leden SET munten="[/COLOR][COLOR= #007700].[/COLOR][URL="http://www.php.net/stripslashes"]stripslashes[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]aantalcr[/COLOR][COLOR= #007700]]).[/COLOR][COLOR= #DD0000]", WHERE naam = "[/COLOR] [COLOR= #007700].[/COLOR] [URL="http://www.php.net/stripslashes"]stripslashes[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]naamcr[/COLOR][COLOR= #007700]]) .[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700]);
    }
    
}[/COLOR][URL="http://www.php.net/else"]else[/URL][COLOR= #007700]{[/COLOR]

?>
<h1>Geef gebruiker credits:</h1>
<form action="" method="post" name="submit">
    Naam:<br>
    <input name="naamcr" type="text"><br>
    Aantal credits:<br>
    <input name="aantalcr" type="text"><br>
    <input name="submit" type="submit" value="Geef credits!">
</form>
[COLOR= #0000BB]<?php[/COLOR]
[COLOR= #007700]}
}[/COLOR][URL="http://www.php.net/else"]else[/URL][COLOR= #007700]{[/COLOR]

    error[COLOR= #007700]([/COLOR][COLOR= #DD0000]red[/COLOR][COLOR= #007700],[/COLOR][COLOR= #DD0000]Je beschikt niet de rechten om deze pagina te bekijken[/COLOR][COLOR= #007700]);
    
}[/COLOR]

layoutonder[COLOR= #007700]();[/COLOR]
?>


In welk programma script jij?
0
Cees

Lid

Berichten
103
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Was eigenlijks voor mij emoMaar had ff niet zin om in te loggen.
Wat was verkeerd dan?
Microsoft expression web
0
Tgrm

Lid

Berichten
2.133
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
[COLOR= #0000BB]<?php[/COLOR]
    [URL="http://www.php.net/include"]include[/URL] [COLOR= #007700]([/COLOR][COLOR= #DD0000]"config.php"[/COLOR][COLOR= #007700]);[/COLOR]
    
    [URL="http://www.php.net/define"]define[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]TITLE[/COLOR][COLOR= #007700],[/COLOR][COLOR= #DD0000]Geef credits[/COLOR][COLOR= #007700]);[/COLOR]
    
    layoutboven[COLOR= #007700]();[/COLOR]
    checklogin[COLOR= #007700]();[/COLOR]
    
    [COLOR= #0000BB]$uQuery[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM leden WHERE naam = "[/COLOR] [COLOR= #007700].[/COLOR] [URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]login[/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]
    [COLOR= #0000BB]$uFetch[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_assoc"]mysql_fetch_assoc[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$uQuery[/COLOR][COLOR= #007700]);[/COLOR]
    [URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$uFetch[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]status[/COLOR][COLOR= #007700]] ==[/COLOR] [COLOR= #DD0000]"2"[/COLOR][COLOR= #007700])
    {[/COLOR]

        [COLOR= #0000BB]$khQuery[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM leden WHERE naam = "[/COLOR] [COLOR= #007700].[/COLOR] [URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/stripslashes"]stripslashes[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]naamcr[/COLOR][COLOR= #007700]])) .[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700]);[/COLOR]
        [COLOR= #0000BB]$khTel[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$khQuery[/COLOR][COLOR= #007700]);[/COLOR]

        [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]submit[/COLOR][COLOR= #007700]]))
        {[/COLOR]

            [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]naamcr[/COLOR][COLOR= #007700]]))
            {[/COLOR]
                [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]Je hebt geen naam ingevuld![/COLOR][COLOR= #007700];
            }[/COLOR]
            [URL="http://www.php.net/elseif"]elseif[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]aantalcr[/COLOR][COLOR= #007700]]))
            {[/COLOR]
                [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]Je hebt geen aantal credits ingevuld![/COLOR][COLOR= #007700];
            }[/COLOR]
            [URL="http://www.php.net/elseif"]elseif[/URL][COLOR= #007700](![/COLOR][URL="http://www.php.net/ctype_digit"]ctype_digit[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]aantalcr[/COLOR][COLOR= #007700]]))
            {[/COLOR]
                [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]Je moet wel een getal invullen![/COLOR][COLOR= #007700];
            }[/COLOR]
            [URL="http://www.php.net/elseif"]elseif[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$khTel[/COLOR] [COLOR= #007700]==[/COLOR] [COLOR= #0000BB]0[/COLOR][COLOR= #007700])
            {[/COLOR]
                [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000][/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]naam[/COLOR][COLOR= #007700]].[/COLOR] [COLOR= #DD0000] bestaat niet![/COLOR][COLOR= #007700];
            }
        }[/COLOR]
        [URL="http://www.php.net/else"]else[/URL]
        [COLOR= #007700]{[/COLOR]
            [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"UPDATE leden SET munten="[/COLOR][COLOR= #007700].[/COLOR][URL="http://www.php.net/stripslashes"]stripslashes[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]aantalcr[/COLOR][COLOR= #007700]]).[/COLOR][COLOR= #DD0000]", WHERE naam = "[/COLOR] [COLOR= #007700].[/COLOR] [URL="http://www.php.net/stripslashes"]stripslashes[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]naamcr[/COLOR][COLOR= #007700]]) .[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700]);
        }
    }[/COLOR]
    [URL="http://www.php.net/else"]else[/URL]
    [COLOR= #007700]{[/COLOR]

    ?>
    <h1>Geef gebruiker credits:</h1>
    <form action="" method="post" name="submit">
        Naam:<br>
        <input name="naamcr" type="text"><br>
        Aantal credits:<br>
        <input name="aantalcr" type="text"><br>
        <input name="submit" type="submit" value="Geef credits!">
    </form>
    [COLOR= #0000BB]<?php[/COLOR]
    [COLOR= #007700]}
    }[/COLOR][URL="http://www.php.net/else"]else[/URL]
    [COLOR= #007700]{[/COLOR]
        error[COLOR= #007700]([/COLOR][COLOR= #DD0000]red[/COLOR][COLOR= #007700],[/COLOR][COLOR= #DD0000]Je beschikt niet de rechten om deze pagina te bekijken[/COLOR][COLOR= #007700]);
    }[/COLOR]

    layoutonder[COLOR= #007700]();[/COLOR]
?>


Ik heb alles es goed overzichtelijk neergezet en hier is de fout:

}
}else
{
error(red,Je beschikt niet de rechten om deze pagina te bekijken);
}

moet zijn:

}else
{
error(red,Je beschikt niet de rechten om deze pagina te bekijken);
}

Edit: ik kijk nu nog es en je hebt 2x else?confused
0
Cees

Lid

Berichten
103
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Die van alemaalte werkt hoor! en dat was niet de fout wat de fout wel was weet ik niet emo
0
Berichten
6.722
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Dat staat duidelijk in de error. emo Alemaaltje heeft gewoon een } voor die else op regel 36 weg gehaalt. emo
0
Berichten
5.957
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Nee wiitse er staan er nog altijd 2.
Het is

Juist:

if(isset($_POST[submit])){

    if(empty($_POST[naamcr])){echo Je hebt geen naam ingevuld!;}
    elseif(empty($_POST[aantalcr])){echo Je hebt geen aantal credits ingevuld!;}
    elseif(!ctype_digit($_POST[aantalcr])){echo Je moet wel een getal invullen!;}
    elseif($khTel == 0){echo .$_POST[naam].  bestaat niet!;}
    else{
    mysql_query("UPDATE leden SET munten=".stripslashes($_POST[aantalcr]).", WHERE naam = " . stripslashes($_POST[naamcr]) . "");
    }


Fout:

if(isset($_POST[submit])){

    if(empty($_POST[naamcr])){echo Je hebt geen naam ingevuld!;}
    elseif(empty($_POST[aantalcr])){echo Je hebt geen aantal credits ingevuld!;}
    elseif(!ctype_digit($_POST[aantalcr])){echo Je moet wel een getal invullen!;}
    elseif($khTel == 0){echo .$_POST[naam].  bestaat niet!;}
    }else{
    mysql_query("UPDATE leden SET munten=".stripslashes($_POST[aantalcr]).", WHERE naam = " . stripslashes($_POST[naamcr]) . "");
    }
0
Cees

Lid

Berichten
103
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Ooh nou zie ik het die was wel moeilijk te vinden toch bedankt wink
0

Jouw reactie

Deel je idee, stel een vraag of help een ander verder.

Editor laden…

Praat mee met de One2xs-community.

Inloggen om te reageren