PHP probleem

Gestart doorMextijs7 reacties18 weergaven

8 berichten · pagina 1 van 1

Mextijs

Lid · Topicstarter

Berichten
787
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Ik volg een tut via youtube en doe precies wat diegene zegt, alleen de echos nederlands ipv engels.

Maar ook al heb ik naar mijn gevoel precies gedaan wat hij heeft gezegd, geeft hij een error.
DIt is het script:
Spoiler tonen
[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"<h1>Registreren</h1>"[/COLOR][COLOR= #007700];[/COLOR]

[COLOR= #0000BB]$submit[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]submit[/COLOR][COLOR= #007700]];[/COLOR]
[COLOR= #FF8000]//form data[/COLOR]
[COLOR= #0000BB]$fullname[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/strip_tags"]strip_tags[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]fullname[/COLOR][COLOR= #007700]]);[/COLOR]
[COLOR= #0000BB]$username[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/strip_tags"]strip_tags[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]username[/COLOR][COLOR= #007700]]);[/COLOR]
[COLOR= #0000BB]$password[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/strip_tags"]strip_tags[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]password[/COLOR][COLOR= #007700]]);[/COLOR]
[COLOR= #0000BB]$repeatpassword[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/strip_tags"]strip_tags[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]repeatpassword[/COLOR][COLOR= #007700]]);[/COLOR]
[COLOR= #0000BB]$date[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/date"]date[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"Y-m-d"[/COLOR][COLOR= #007700]);[/COLOR]


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

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

 [COLOR= #0000BB]$password[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/md5"]md5[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$password[/COLOR][COLOR= #007700]);[/COLOR]
 [COLOR= #0000BB]$repeatpassword[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/md5"]md5[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$repeatpassword[/COLOR][COLOR= #007700]);[/COLOR]
 
 [URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$password[/COLOR][COLOR= #007700]==[/COLOR][COLOR= #0000BB]$repeatpassword[/COLOR][COLOR= #007700])
 {[/COLOR]
  
  [URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][URL="http://www.php.net/strlen"]strlen[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$username[/COLOR][COLOR= #007700]>[/COLOR][COLOR= #0000BB]25[/COLOR][COLOR= #007700])||[/COLOR][URL="http://www.php.net/strlen"]strlen[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$fullname[/COLOR][COLOR= #007700])>[/COLOR][COLOR= #0000BB]25[/COLOR][COLOR= #007700])
  {[/COLOR]
   [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Username of passwod is te lang."[/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/strlen"]strlen[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$password[/COLOR][COLOR= #007700])>[/COLOR][COLOR= #0000BB]25[/COLOR][COLOR= #007700]||[/COLOR][URL="http://www.php.net/strlen"]strlen[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$password[/COLOR][COLOR= #007700]<[/COLOR][COLOR= #0000BB]6[/COLOR][COLOR= #007700])
   {[/COLOR]
    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Wachtwoord moet tussen de 6 en 25 karakters zijn."[/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]"Gelukt."[/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]"De wachtwoorden komen niet overeen."[/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]"Vul alsjeblieft overal iets in."[/COLOR][COLOR= #007700];
}
}[/COLOR]


?>
En dan krijg ik deze error:
Parse error: syntax error, unexpected { in C:xampphtdocsfilesledensysteem
egister.php on line 33

Ik heb daar dus naar gekeken, en naar mijn gevoel klopt het ook gewoon allemaal.
Iemand een idee wat ik alsnog verkeerd gedaan zou kunnen hebben?
0
Mextijs

Lid · Topicstarter

Berichten
787
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Hij werkt nu, mag ik vragen wat er nou verkeerd was?
0
Berichten
9.953
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Je was een { vergeten op lijn 33
0
Rik

Lid

Berichten
18.393
Reputatie
0
Punten
0,04
Lid sinds
Laatst gezien
Sebastiaanh schreef:
Je was een { vergeten op lijn 33
Nee emo
Op lijn 32 had je de if niet afgesloten. Je je moest nog een ) achter je strlen() zetten
0
Berichten
9.953
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Ow lol yummie
0
Mextijs

Lid · Topicstarter

Berichten
787
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Bedankt smile
Wou al zeggen, ik had gwn { op r33
En unexpected != vergeten wink
0
Berichten
160
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
als je een error als dit krijgt, loop altijd even na of er evenveel tags worden geopend als worden gesloten. Net als mij html, dan haal je al vaak een hoop fouten eruit yummie Jammer dat ik niet sneller was sadley// edit: gewoon een tip niet, om je belachelijk te maken.
0
Mextijs

Lid · Topicstarter

Berichten
787
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Dat had ik ook gedaan, alleen had ik deze fout niet gevonden..
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