Loginmenu error (wie fixt krijgt beloning)

Gestart doorJoeri17 reacties16 weergaven

18 berichten · pagina 1 van 2

Joeri

Lid · Topicstarter

Berichten
5.737
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
ZIE LAATSTE POST VAN MIJ JE KRIJGT 0,1
0
Berichten
4.451
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Laat maar!
ik zou het niet weten!
0
Joeri

Lid · Topicstarter

Berichten
5.737
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
http://www.joeriwii.one2xs.nl/KLAAR/

Elke pagina is hetzezlfde ik ben aan het overzetten maar toen kwam ik dit tegen
0
Berichten
13.482
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
op regel 8 misschien nog een } wink
0
Joeri

Lid · Topicstarter

Berichten
5.737
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Thnx nu kan ik inloggen maar zie ik dan wel deze fout :

Warning: Cannot modify header information - headers already sent by (output started at /home/joeriwii/domains/joeriwii.one2xs.nl/public_html/KLAAR/header.php:16) in /home/joeriwii/domains/joeriwii.one2xs.nl/public_html/KLAAR/login_menu.php on line 40

wat moet ik daar nou mee?
0
Berichten
13.482
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Je hebt er een hele site voor als output
na een output kun je geen headers meer doen
het slimste is dan nog een meta refresh te doen ofzo
0
Joeri

Lid · Topicstarter

Berichten
5.737
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
En hoe maak ik daar dan zon meta refresh in?
0
Berichten
13.482
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Google.
0
Joeri

Lid · Topicstarter

Berichten
5.737
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
OPGELOST CODE WEG
0
Berichten
13.482
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Dat is dus die header waar de fout aan ligt
en omdat je hele site eerst komt en dan het inloggen
is er al een ouput
en na outputs kunnen geen headers.
en dat heb ik net al verteld
0
Joeri

Lid · Topicstarter

Berichten
5.737
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Ik heb het er nu ingezet maar dan geeft hij weer een andere fout! :

Ik heb een error die staat bij het login menu van mij :

Parse error: syntax error, unexpected }, expecting , or ; in /home/joeriwii/domains/joeriwii.one2xs.nl/public_html/KLAAR/login_menu.php on line 42

[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]
            ?>
            <a href="index.php?p=logout">Uitloggen</a><br />
            <a href="index.php?p=list">Ledenlijst</a><br />
            [COLOR= #0000BB]<?php[/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][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]$query[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT id,username,pass FROM login_members WHERE username = "[/COLOR][COLOR= #007700].[/COLOR][URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]username[/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]$res[/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][URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$fout[/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]$query[/COLOR][COLOR= #007700]) ==[/COLOR] [COLOR= #0000BB]0[/COLOR][COLOR= #007700]) {[/COLOR]
                    [COLOR= #0000BB]$fout[/COLOR][COLOR= #007700][] =[/COLOR] [COLOR= #DD0000]De gebruiker bestaat niet[/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]username[/COLOR][COLOR= #007700]])) {[/COLOR]
                    [COLOR= #0000BB]$fout[/COLOR][COLOR= #007700][] =[/COLOR] [COLOR= #DD0000]Geen gebruikersnaam ingevuld[/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]$query[/COLOR][COLOR= #007700])) {[/COLOR]
                    [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$res[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]pass[/COLOR][COLOR= #007700]] !=[/COLOR] hash[COLOR= #007700]([/COLOR][COLOR= #DD0000]sha256[/COLOR][COLOR= #007700],[/COLOR] hash[COLOR= #007700]([/COLOR][COLOR= #DD0000]sha512[/COLOR][COLOR= #007700],[/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]password[/COLOR][COLOR= #007700]]))) {[/COLOR]
                        [COLOR= #0000BB]$fout[/COLOR][COLOR= #007700][] =[/COLOR] [COLOR= #DD0000]Foutief wachtwoord[/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]$fout[/COLOR][COLOR= #007700])) {[/COLOR]
                [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<div class="multierror"><strong>Er [/COLOR] [COLOR= #007700]. ([/COLOR][URL="http://www.php.net/count"]count[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$fout[/COLOR][COLOR= #007700]) >[/COLOR] [COLOR= #0000BB]1[/COLOR] [COLOR= #007700]?[/COLOR] [COLOR= #DD0000]zijn meerdere fouten[/COLOR] [COLOR= #007700]:[/COLOR] [COLOR= #DD0000]is een fout[/COLOR][COLOR= #007700]) .[/COLOR] [COLOR= #DD0000] gevonden:</strong><br />[/COLOR][COLOR= #007700];[/COLOR]
                    [URL="http://www.php.net/foreach"]foreach[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$fout[/COLOR] [COLOR= #007700]as[/COLOR] [COLOR= #0000BB]$val[/COLOR][COLOR= #007700]){[/COLOR]
                        [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$val[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #DD0000]<br />[/COLOR][COLOR= #007700];
                    }[/COLOR]
                [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]</div>[/COLOR][COLOR= #007700];
            }[/COLOR] [URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]
                [COLOR= #0000BB]$to_be_hashed[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$_SERVER[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]REMOTE_ADRR[/COLOR][COLOR= #007700]] .[/COLOR] [COLOR= #0000BB]$res[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]username[/COLOR][COLOR= #007700]];[/COLOR]
                [COLOR= #0000BB]$hash[/COLOR] [COLOR= #007700]=[/COLOR] hash[COLOR= #007700]([/COLOR][COLOR= #DD0000]sha256[/COLOR][COLOR= #007700],[/COLOR] hash[COLOR= #007700]([/COLOR][COLOR= #DD0000]sha512[/COLOR][COLOR= #007700],[/COLOR][COLOR= #0000BB]$to_be_hashed[/COLOR][COLOR= #007700]));[/COLOR]
                [COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]login_hash[/COLOR][COLOR= #007700]] =[/COLOR] [COLOR= #0000BB]$hash[/COLOR][COLOR= #007700];[/COLOR]
                [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"INSERT INTO login_sessions (userid,hash,ip) VALUES ("[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$res[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]","[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$hash[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000]","[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_SERVER[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]REMOTE_ADDR[/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]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]userid[/COLOR][COLOR= #007700]] =[/COLOR] [COLOR= #0000BB]$res[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]];[/COLOR]
                [URL="http://www.php.net/header"]header[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"5; url=index.php?p=inloghome"[/COLOR][COLOR= #007700]);[/COLOR] 
                [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<meta http-equiv="refresh" content="5; URL=index.php?p=ingelogd" />[/COLOR]
            [COLOR= #007700]}       
        }[/COLOR]
?>
    <form name="login" method="POST"> 
        Gebruikersnaam:<br /> 
        <input style="float: left; position: relative;" type="text" name="username" id="username" onblur="checklogin(this.value);" /> 
        <div id="usererror"></div><br /><br /> 
        Wachtwoord:<br /> 
        <input type="password" name="password" id="password" /><br /><br /> 
        
        <input type="submit" name="submit" value="Inloggen"> 
    </form> 
[COLOR= #0000BB]<?php[/COLOR]
    [COLOR= #007700]}[/COLOR]
?>


wie weet de oplosssing
0
Berichten
2.950
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
na die echo op line 41 moet een ;

dus echo ;
0
Joeri

Lid · Topicstarter

Berichten
5.737
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Opgelost code verwijderd
0
Berichten
2.950
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Sorry, maar ik raad je aan php te leren en niet letterlijk te kopieren wat ik zeg voordat je met scripts gaat werken
0
Joeri

Lid · Topicstarter

Berichten
5.737
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Ik weet het en ik ben al bezig met php te leren maar ik heb deze gekocht en toen ik wou gaan bewerken kwam ik foutjes tegen, dan zal ik nog maar meer moeten leren.
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