T_ELSE

Gestart doorBoude2 reacties56 weergaven

3 berichten · pagina 1 van 1

Boude

Lid · Topicstarter

Berichten
2.837
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Kan iemand mij zeggen wat hier aan fout is??

[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]login_hash[/COLOR][COLOR= #007700]]) &&[/COLOR] [URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]userid[/COLOR][COLOR= #007700]])) {[/COLOR]
        [COLOR= #0000BB]$check[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM login_sessions WHERE ip = "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_SERVER[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]REMOTE_ADDR[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]" AND hash = "[/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_hash[/COLOR][COLOR= #007700]]).[/COLOR][COLOR= #DD0000]" ORDER BY log_time DESC"[/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/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$check[/COLOR][COLOR= #007700])) {[/COLOR]
            [COLOR= #0000BB]$query[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT status FROM login_member WHERE id = "[/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]userid[/COLOR][COLOR= #007700]]) );[/COLOR]
            [COLOR= #0000BB]$status[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_assoc"]mysql_fetch_assoc[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$query[/COLOR][COLOR= #007700]);[/COLOR]
            [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$status[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]status[/COLOR][COLOR= #007700]] >=[/COLOR] [COLOR= #0000BB]1[/COLOR][COLOR= #007700])[/COLOR] [COLOR= #FF8000]// 1 = mod, 2 = admin[/COLOR]
                [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$status[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]status[/COLOR][COLOR= #007700]] ==[/COLOR] [COLOR= #0000BB]0[/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]<div class="multierror">Je hebt geen recht om op deze pagina te komen</div>[/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]<div class="multierror">Je bent niet de juiste rang om deze pagina te bezoeken</div>[/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]<div class="multierror">Je moet ingelogd zijn om deze pagina te bezoeken</div>[/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]<div class="multierror">Je moet ingelogd zijn om deze pagina te bezoeken</div>[/COLOR]
[COLOR= #007700]}[/COLOR]
?>


Sorry als het echt een domme vraag is heb alles al geprobeer bloos..
0
Berichten
8.602
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Op lijn 19 een ; achter de echo zetten
0
Krm

Lid

Berichten
6.235
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
net zoals milan al zij maak regel 19 zo

echo <div class="multierror">Je moet ingelogd zijn om deze pagina te bezoeken</div>;
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