[PHP] Else hulp gezocht!

Gestart doorMarvinn15 reacties63 weergaven

16 berichten · pagina 1 van 2

Marvinn

Lid · Topicstarter

Berichten
2.609
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Hooi!

Ik ben bezig met een php code.
Spoiler tonen
[COLOR= #0000BB]<?php[/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]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/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]

        [COLOR= #0000BB]$sql_club[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM clublid WHERE member_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]
        [COLOR= #0000BB]$row_club[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_assoc"]mysql_fetch_assoc[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$sql_club[/COLOR][COLOR= #007700]);[/COLOR]
        
        [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$sql_club[/COLOR][COLOR= #007700]) ==[/COLOR] [COLOR= #0000BB]1[/COLOR][COLOR= #007700]) {[/COLOR]
            [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"UPDATE leden SET muntjes = muntjes - "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$kooprespectclub[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000]" WHERE member_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][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 muntjes = muntjes - "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$kooprespect[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000]" WHERE member_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][URL="http://www.php.net/elseif"]elseif[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$row_leden[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]muntjes[/COLOR][COLOR= #007700]] -[/COLOR] [COLOR= #0000BB]$row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]prijs[/COLOR][COLOR= #007700]] <[/COLOR] [COLOR= #0000BB]0[/COLOR][COLOR= #007700]) {[/COLOR]
                [URL="http://www.php.net/return"]return[/URL] [COLOR= #DD0000]"Je hebt niet genoeg muntjes om dit item te kopen."[/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 respects = respects + 3 WHERE member_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]

        [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]() ==[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700]) {[/COLOR]
            [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]Je hebt succesvol 3 respect erbij gekocht.[/COLOR][COLOR= #007700];[/COLOR]
            [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<meta HTTP-EQUIV="REFRESH" content="2; url=?p=koop_respect">[/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]Er is iets fout gegaan.[/COLOR][COLOR= #007700];[/COLOR]
            [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<meta HTTP-EQUIV="REFRESH" content="2; url=?p=koop_respect">[/COLOR][COLOR= #007700];
        }
    }[/COLOR][URL="http://www.php.net/else"]else[/URL][COLOR= #007700]{
    }[/COLOR]
?>

<form action="[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$_SERVER[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]PHP_SELF[/COLOR][COLOR= #007700]][/COLOR] ?>?p=koop_respect" method="post">
[COLOR= #0000BB]<?php
    $sql[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM leden WHERE member_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]
    [COLOR= #0000BB]$row[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_assoc"]mysql_fetch_assoc[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$sql[/COLOR][COLOR= #007700]);[/COLOR]

    ?>  
    <center>Hooi: <b>[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]gebruikersnaam[/COLOR][COLOR= #007700]];[/COLOR] ?></b>!<br />
    <br />Op deze pagina kun jij respect kopen. <br/><br/>Op dit moment kun jij nog: <b>[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]respects[/COLOR][COLOR= #007700]];[/COLOR] ?></b>x respect geven aan mensen.<br /><br />In totaal heb jij <b>[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]respect[/COLOR][COLOR= #007700]];[/COLOR] ?></b>x respect gehad.<br><br>
    De prijzen voor respect zijn redelijk prijzig aangezien wij niet willen dat jullie in een mum van tijd 2500x respects hebben.
    <br><br>
    Als je clublid bent is het 10 muntjes GOEDKOPER!! <br><a href="http://www.habbotjes.be/index.php?p=clublid"  target=_new"><b><i>(Klik hier om clublid te worden)</i></b></a><br><hr>
    <strong>Prijzen:</strong><br />
    Dus als je <u>niet</u> clublid bent kost het: <strong>[COLOR= #0000BB]<?[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$kooprespect[/COLOR] ?></strong> muntjes!<br />
    En als je <u>wel</u> clublid bent kost het: <strong>[COLOR= #0000BB]<?[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$kooprespectclub[/COLOR] ?></strong> muntjes!<br />
    <br />
    <input type="submit" name="submit" value="Koop 3 respect!" /></center>
</form>
[COLOR= #0000BB]<?php[/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]Je bent niet ingelogd![/COLOR][COLOR= #007700];
}[/COLOR]
?>
Error:
Parse error: syntax error, unexpected T_ELSE in /home/nickjexx/domains/habbotjes.be/public_html/pagina/koop_respect.php on line 26


Wat doe ik fout?

Groetjesss Nickjexx/Marvin
0
Berichten
15.303
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Haal die } op lijn 27 eens weg.
0
Marvinn

Lid · Topicstarter

Berichten
2.609
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Parse error: syntax error, unexpected T_ELSE in /home/nickjexx/domains/habbotjes.be/public_html/pagina/koop_respect.php on line 26
0
Berichten
1.101
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Die else stond daar zonder reden?

[COLOR= #0000BB]<?php[/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]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/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]

        [COLOR= #0000BB]$sql_club[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM clublid WHERE member_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]
        [COLOR= #0000BB]$row_club[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_assoc"]mysql_fetch_assoc[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$sql_club[/COLOR][COLOR= #007700]);[/COLOR]
        
        [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$sql_club[/COLOR][COLOR= #007700]) ==[/COLOR] [COLOR= #0000BB]1[/COLOR][COLOR= #007700]) {[/COLOR]
            [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"UPDATE leden SET muntjes = muntjes - "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$kooprespectclub[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000]" WHERE member_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][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 muntjes = muntjes - "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$kooprespect[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000]" WHERE member_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][URL="http://www.php.net/elseif"]elseif[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$row_leden[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]muntjes[/COLOR][COLOR= #007700]] -[/COLOR] [COLOR= #0000BB]$row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]prijs[/COLOR][COLOR= #007700]] <[/COLOR] [COLOR= #0000BB]0[/COLOR][COLOR= #007700]) {[/COLOR]
                [URL="http://www.php.net/return"]return[/URL] [COLOR= #DD0000]"Je hebt niet genoeg muntjes om dit item te kopen."[/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 respects = respects + 3 WHERE member_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]

        [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]() ==[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700]) {[/COLOR]
            [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]Je hebt succesvol 3 respect erbij gekocht.[/COLOR][COLOR= #007700];[/COLOR]
            [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<meta HTTP-EQUIV="REFRESH" content="2; url=?p=koop_respect">[/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]Er is iets fout gegaan.[/COLOR][COLOR= #007700];[/COLOR]
            [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<meta HTTP-EQUIV="REFRESH" content="2; url=?p=koop_respect">[/COLOR][COLOR= #007700];
        }
    }[/COLOR]
?>


Dat werkt wel smile.
0
Marvinn

Lid · Topicstarter

Berichten
2.609
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Parse error: syntax error, unexpected } in /home/nickjexx/domains/habbotjes.be/public_html/pagina/koop_respect.php on line 48

}
}else{
echo Je bent niet ingelogd!;
}
?>

dit stukje.
0
Marv

Lid

Berichten
3.092
Reputatie
1
Punten
0,21
Lid sinds
Laatst gezien
[COLOR= #0000BB]<?php[/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]Je bent niet ingelogd![/COLOR][COLOR= #007700];
}[/COLOR]
?>
0
Marvinn

Lid · Topicstarter

Berichten
2.609
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Nee ik heb 0 muntjes en toch kan ik het kopen redface
0
Berichten
15.446
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
zo dan misschien?:

[COLOR= #0000BB]<?php[/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]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/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]

        [COLOR= #0000BB]$sql_club[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM clublid WHERE member_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]
        [COLOR= #0000BB]$row_club[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_assoc"]mysql_fetch_assoc[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$sql_club[/COLOR][COLOR= #007700]);[/COLOR]
        
        [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$sql_club[/COLOR][COLOR= #007700]) ==[/COLOR] [COLOR= #0000BB]1[/COLOR][COLOR= #007700]) 
        {[/COLOR]
            [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"UPDATE leden SET muntjes = muntjes - "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$kooprespectclub[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000]" WHERE member_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]
            [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 muntjes = muntjes - "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$kooprespect[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000]" WHERE member_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]
            
        [URL="http://www.php.net/elseif"]elseif[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$row_leden[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]muntjes[/COLOR][COLOR= #007700]] -[/COLOR] [COLOR= #0000BB]$row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]prijs[/COLOR][COLOR= #007700]] <[/COLOR] [COLOR= #0000BB]0[/COLOR][COLOR= #007700]) 
        {[/COLOR]
            [URL="http://www.php.net/return"]return[/URL] [COLOR= #DD0000]"Je hebt niet genoeg muntjes om dit item te kopen."[/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 respects = respects + 3 WHERE member_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]

                [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]() ==[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700]) 
                {[/COLOR]
                    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]Je hebt succesvol 3 respect erbij gekocht.[/COLOR][COLOR= #007700];[/COLOR]
                    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<meta HTTP-EQUIV="REFRESH" content="2; url=?p=koop_respect">[/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]Er is iets fout gegaan.[/COLOR][COLOR= #007700];[/COLOR]
                    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<meta HTTP-EQUIV="REFRESH" content="2; url=?p=koop_respect">[/COLOR][COLOR= #007700];
                }
            }
    }[/COLOR]
    [URL="http://www.php.net/else"]else[/URL]
    [COLOR= #007700]{[/COLOR]
?>

<form action="[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$_SERVER[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]PHP_SELF[/COLOR][COLOR= #007700]][/COLOR] ?>?p=koop_respect" method="post">
[COLOR= #0000BB]<?php
    $sql[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM leden WHERE member_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]
    [COLOR= #0000BB]$row[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_assoc"]mysql_fetch_assoc[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$sql[/COLOR][COLOR= #007700]);[/COLOR]

    ?>  
    <center>Hooi: <b>[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]gebruikersnaam[/COLOR][COLOR= #007700]];[/COLOR] ?></b>!<br />
    <br />Op deze pagina kun jij respect kopen. <br/><br/>Op dit moment kun jij nog: <b>[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]respects[/COLOR][COLOR= #007700]];[/COLOR] ?></b>x respect geven aan mensen.<br /><br />In totaal heb jij <b>[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]respect[/COLOR][COLOR= #007700]];[/COLOR] ?></b>x respect gehad.<br><br>
    De prijzen voor respect zijn redelijk prijzig aangezien wij niet willen dat jullie in een mum van tijd 2500x respects hebben.
    <br><br>
    Als je clublid bent is het 10 muntjes GOEDKOPER!! <br><a href="http://www.habbotjes.be/index.php?p=clublid"  target=_new"><b><i>(Klik hier om clublid te worden)</i></b></a><br><hr>
    <strong>Prijzen:</strong><br />
    Dus als je <u>niet</u> clublid bent kost het: <strong>[COLOR= #0000BB]<?[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$kooprespect[/COLOR] ?></strong> muntjes!<br />
    En als je <u>wel</u> clublid bent kost het: <strong>[COLOR= #0000BB]<?[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$kooprespectclub[/COLOR] ?></strong> muntjes!<br />
    <br />
    <input type="submit" name="submit" value="Koop 3 respect!" /></center>
</form>
[COLOR= #0000BB]<?php[/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]Je bent niet ingelogd![/COLOR][COLOR= #007700];
}[/COLOR]
?>
0
Berichten
79
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
@Marjolein; nee

[COLOR= #0000BB]<?php[/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]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/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]

        [COLOR= #0000BB]$sql_club[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM clublid WHERE member_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]
        [COLOR= #0000BB]$row_club[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_assoc"]mysql_fetch_assoc[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$sql_club[/COLOR][COLOR= #007700]);[/COLOR]
        
        [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$sql_club[/COLOR][COLOR= #007700]) ==[/COLOR] [COLOR= #0000BB]1[/COLOR][COLOR= #007700])
        {[/COLOR]
            [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"UPDATE leden SET muntjes = muntjes - "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$kooprespectclub[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000]" WHERE member_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]
            [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 muntjes = muntjes - "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$kooprespect[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000]" WHERE member_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]
            
        [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$row_leden[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]muntjes[/COLOR][COLOR= #007700]] -[/COLOR] [COLOR= #0000BB]$row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]prijs[/COLOR][COLOR= #007700]] <[/COLOR] [COLOR= #0000BB]0[/COLOR][COLOR= #007700])
        {[/COLOR]
            [URL="http://www.php.net/return"]return[/URL] [COLOR= #DD0000]"Je hebt niet genoeg muntjes om dit item te kopen."[/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 respects = respects + 3 WHERE member_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]

                [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]() ==[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700])
                {[/COLOR]
                    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]Je hebt succesvol 3 respect erbij gekocht.[/COLOR][COLOR= #007700];[/COLOR]
                    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<meta HTTP-EQUIV="REFRESH" content="2; url=?p=koop_respect">[/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]Er is iets fout gegaan.[/COLOR][COLOR= #007700];[/COLOR]
                    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<meta HTTP-EQUIV="REFRESH" content="2; url=?p=koop_respect">[/COLOR][COLOR= #007700];
                }
            }
    }[/COLOR]
    [URL="http://www.php.net/else"]else[/URL]
    [COLOR= #007700]{[/COLOR]
?>

<form action="[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$_SERVER[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]PHP_SELF[/COLOR][COLOR= #007700]][/COLOR] ?>?p=koop_respect" method="post">
[COLOR= #0000BB]<?php
    $sql[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM leden WHERE member_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]
    [COLOR= #0000BB]$row[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_assoc"]mysql_fetch_assoc[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$sql[/COLOR][COLOR= #007700]);[/COLOR]

    ?>  
    <center>Hooi: <b>[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]gebruikersnaam[/COLOR][COLOR= #007700]];[/COLOR] ?></b>!<br />
    <br />Op deze pagina kun jij respect kopen. <br/><br/>Op dit moment kun jij nog: <b>[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]respects[/COLOR][COLOR= #007700]];[/COLOR] ?></b>x respect geven aan mensen.<br /><br />In totaal heb jij <b>[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]respect[/COLOR][COLOR= #007700]];[/COLOR] ?></b>x respect gehad.<br><br>
    De prijzen voor respect zijn redelijk prijzig aangezien wij niet willen dat jullie in een mum van tijd 2500x respects hebben.
    <br><br>
    Als je clublid bent is het 10 muntjes GOEDKOPER!! <br><a href="http://www.habbotjes.be/index.php?p=clublid"  target=_new"><b><i>(Klik hier om clublid te worden)</i></b></a><br><hr>
    <strong>Prijzen:</strong><br />
    Dus als je <u>niet</u> clublid bent kost het: <strong>[COLOR= #0000BB]<?[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$kooprespect[/COLOR] ?></strong> muntjes!<br />
    En als je <u>wel</u> clublid bent kost het: <strong>[COLOR= #0000BB]<?[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$kooprespectclub[/COLOR] ?></strong> muntjes!<br />
    <br />
    <input type="submit" name="submit" value="Koop 3 respect!" /></center>
</form>
[COLOR= #0000BB]<?php[/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]Je bent niet ingelogd![/COLOR][COLOR= #007700];
}[/COLOR]
?>
0
Berichten
18.482
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Die return op lijn 22 gaat ook niet echt werken...
0
Berichten
15.446
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
en het verschil is?
0
Berichten
79
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Marjolein schreef:
en het verschil is?
jij;
elseif($row_leden[muntjes] - $row[prijs] < 0)

ik;
if($row_leden[muntjes] - $row[prijs] < 0)
0
Marvinn

Lid · Topicstarter

Berichten
2.609
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Luukvdo schreef:
Die return op lijn 22 gaat ook niet echt werken...
Als je dan zegt hoe het wel moet? Kom ik misschien verder.
0
Berichten
79
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Nickjexx schreef:
Eerdere citaten tonen
Luukvdo schreef:
Die return op lijn 22 gaat ook niet echt werken...
Als je dan zegt hoe het wel moet? Kom ik misschien verder.
Hoe kom je eigenlijk op het idee om daar een return neer te zetten? Je gebruikt overal echo maar daar een return? Leg eens uit...
0
Marvinn

Lid · Topicstarter

Berichten
2.609
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Omdat ik Else of zo niet snap. En ik had het uit een ander script gehaald van me website yummie
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