Weer een error!

Gestart doorDylan23 reacties30 weergaven

24 berichten · pagina 2 van 2

Berichten
372
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Martijnn schreef:
Eerdere citaten tonen
Dylanh schreef:
Kan iemand voor mij "uitlijnen" xdcry
Ja Adobe DreamWeaver kan dat, maar dat programma is niet gratis, je wel gratis een 30 dagen trial nemen.
Commands -> Apply Source Formatting
Microsoft Frontpage kan het ook gewoon dacht ik! En als je echt wat wilt bereiken is het sowieso handig een programma aan te aanschaffen!
0
Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
Dylan, ben je zo lui om ff je tab toets in te drukken emo!
0
Berichten
3.314
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Spatiebalk x4 induwen en zorgen dat alles er netjes uitziet in de stijl als

if(piet=jarig)
....{
........echo "hoi Piet";
....}

of

if(piet=jarig){
........echo "hoi Piet";
....}

Punten zijn spaties yummie (of 4 spaties zijn tabs maar ik zou spaties gebruiken)

Verder moet je je wachtwoorden verplicht hashen
0
Dylan

Lid · Topicstarter

Berichten
14.025
Reputatie
1
Punten
0,01
Lid sinds
Laatst gezien
nu hebt ik dit:

[COLOR= #0000BB]<?php[/COLOR]
[COLOR= #FF8000]// Copyright by Dylanh @ one2xs.com [/COLOR]
[COLOR= #0000BB]$username[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]username[/COLOR][COLOR= #007700]];[/COLOR]
[COLOR= #0000BB]$password[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]password[/COLOR][COLOR= #007700]];[/COLOR]

[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$username[/COLOR][COLOR= #007700]&&[/COLOR][COLOR= #0000BB]$password[/COLOR][COLOR= #007700])
{[/COLOR]

[COLOR= #0000BB]$connect[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_connect"]mysql_connect[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"localhost"[/COLOR][COLOR= #007700],[/COLOR][COLOR= #DD0000]"root"[/COLOR][COLOR= #007700],[/COLOR][COLOR= #DD0000]"***"[/COLOR][COLOR= #007700])[/COLOR] or [URL="http://www.php.net/die"]die[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"Oeps geen verbinding met de mysql server"[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/mysql_select_db"]mysql_select_db[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"php"[/COLOR][COLOR= #007700])[/COLOR] or [URL="http://www.php.net/die"]die[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"Kan de database niet vinden!"[/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 * FROM users WHERE username=$username"[/COLOR][COLOR= #007700]);[/COLOR]

[COLOR= #0000BB]$numrows[/COLOR] [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]$numrows[/COLOR][COLOR= #007700]!=[/COLOR][COLOR= #0000BB]0[/COLOR][COLOR= #007700])
{[/COLOR]
    

        [URL="http://www.php.net/while"]while[/URL] [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]$query[/COLOR][COLOR= #007700]))
        {[/COLOR]
    
    [COLOR= #0000BB]$dbusername[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]username[/COLOR][COLOR= #007700]];[/COLOR]
    [COLOR= #0000BB]$dbpassword[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]password[/COLOR][COLOR= #007700]];[/COLOR]


[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$username[/COLOR][COLOR= #007700]==[/COLOR][COLOR= #0000BB]$dbusername[/COLOR][COLOR= #007700]&&[/COLOR][COLOR= #0000BB]$password[/COLOR][COLOR= #007700]==[/COLOR][COLOR= #0000BB]$dbpassword[/COLOR][COLOR= #007700])
{[/COLOR]
    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Je bent ingelogt!!"[/COLOR][COLOR= #007700];
}[/COLOR]
[URL="http://www.php.net/else"]else[/URL]
    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Oeps fout wachtwoord"[/COLOR][COLOR= #007700];
}

{[/COLOR]

[URL="http://www.php.net/else"]else[/URL]
    [URL="http://www.php.net/die"]die[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"Oeps gebruikersnaam is niet gevonden!!"[/COLOR][COLOR= #007700]);[/COLOR]

[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$numrows[/COLOR][COLOR= #007700];

}[/COLOR]
[URL="http://www.php.net/else"]else[/URL]
  [URL="http://www.php.net/die"]die[/URL] [COLOR= #007700]([/COLOR][COLOR= #DD0000]"Log aub goed in!"[/COLOR][COLOR= #007700]);[/COLOR]
  
?>


en geeft tie een eroro op line 37
0
Berichten
1.053
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Je else is niet goed. Voorbeeld:

[COLOR= #0000BB]<?php

$tel[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]1[/COLOR][COLOR= #007700]+[/COLOR][COLOR= #0000BB]1[/COLOR][COLOR= #007700];[/COLOR]

[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$tel[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]2[/COLOR][COLOR= #007700]){[/COLOR]
    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Yeah!"[/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]"It sucks"[/COLOR][COLOR= #007700];
}[/COLOR]

?>


We kunnen niet alles voorkauwen he.
0
Berichten
3.314
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Der staan nog meer fouten in je ( en {.
0
Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
Kyron schreef:
Spatiebalk x4 induwen en zorgen dat alles er netjes uitziet in de stijl als
if(piet=jarig)
....{
........echo "hoi Piet";
....}

of

if(piet=jarig){
........echo "hoi Piet";
....}

Punten zijn spaties yummie (of 4 spaties zijn tabs maar ik zou spaties gebruiken)

Verder moet je je wachtwoorden verplicht hashen

Spaties zijn super irritant tijdens het scripten.
Heb jij dan zin om iedere regel super veel spaties te zetten
0
Berichten
3.314
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Een beetje editor zet tabs om in spaties maar daar gaat deze discussie niet over yummie
0
Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
Kyron schreef:
Een beetje editor zet tabs om in spaties maar daar gaat deze discussie niet over yummie
Dat heb ik juist uitgezet emoDas echt iri
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