_Timmi_ Posted June 24, 2012 Share Posted June 24, 2012 Hallo ich habe ein Problem bei mir kommt immer folgender Error (homepage) Parse error: syntax error, unexpected $end in /var/customers/webs/ni4225_2/HP/register.php on line 45 Hier register.php <?php $verbindung = mysql_connect("****", "****" , "****") or die("Verbindung zur Datenbank konnte nicht hergestellt werden"); mysql_select_db("*****") or die ("Datenbank konnte nicht ausgew?hlt werden"); $username = $_POST["username"]; $ingame = $_POST["ingame"]; $passwort = $_POST["passwort"]; $passwort2 = $_POST["passwort2"]; if($passwort != $passwort2 OR $username == "" OR $passwort == "") { echo "Eingabefehler. Bitte alle Felder korekt ausf?llen. <a href=\"register.html\">Zur?ck</a>"; exit; } $passwort = md5($passwort); $result = mysql_query("SELECT id FROM login WHERE username LIKE '$username'"); $menge = mysql_num_rows($result); if($menge == 0) { $eintrag = "INSERT INTO login (username, passwort, ingame) VALUES ('$username', '$passwort', '$ingame')"; $eintragen = mysql_query($eintrag); if($eintragen == true) { echo "Benutzername <b>$username</b> wurde erstellt. <a href=\"index.php\">Login</a>"; } else { echo "Fehler beim Speichern des Benutzernames. <a href=\"register.html\">Zur?ck</a>"; } } else { echo "Benutzername schon vorhanden. <a href=\"eintragen.html\">Zur?ck</a>"; } ?> Quote Link to comment https://forums.phpfreaks.com/topic/264694-probleme-mit-results/ Share on other sites More sharing options...
smoseley Posted June 24, 2012 Share Posted June 24, 2012 Deutsch? Quote Link to comment https://forums.phpfreaks.com/topic/264694-probleme-mit-results/#findComment-1356607 Share on other sites More sharing options...
_Timmi_ Posted June 24, 2012 Author Share Posted June 24, 2012 Ja Yes of Couse Quote Link to comment https://forums.phpfreaks.com/topic/264694-probleme-mit-results/#findComment-1356608 Share on other sites More sharing options...
Mahngiel Posted June 24, 2012 Share Posted June 24, 2012 dicc habe nich einer } <?php if($menge == 0) { $eintrag = "INSERT INTO login (username, passwort, ingame) VALUES ('$username', '$passwort', '$ingame')"; $eintragen = mysql_query($eintrag); if($eintragen == true) { echo "Benutzername <b>$username</b> wurde erstellt. <a href=\"index.php\">Login</a>"; } else { echo "Fehler beim Speichern des Benutzernames. <a href=\"register.html\">Zur?ck</a>"; } else { echo "Benutzername schon vorhanden. <a href=\"eintragen.html\">Zur?ck</a>"; } <------------ ?> Quote Link to comment https://forums.phpfreaks.com/topic/264694-probleme-mit-results/#findComment-1356614 Share on other sites More sharing options...
Pikachu2000 Posted June 24, 2012 Share Posted June 24, 2012 This is a forum in which the English language is used. Quote Link to comment https://forums.phpfreaks.com/topic/264694-probleme-mit-results/#findComment-1356617 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.