Web_spider
Neues Mitglied
hi all ![Big Grin :D :D](https://cdn.jsdelivr.net/joypixels/assets/8.0/png/unicode/64/1f600.png)
Bei diesem Quellcode zeigt der BRowser dies an:
Hier der Code
Die Zeile 17 wäre:
Hoffe auf Hilfe
mfg web_spider![Big Grin :D :D](https://cdn.jsdelivr.net/joypixels/assets/8.0/png/unicode/64/1f600.png)
![Big Grin :D :D](https://cdn.jsdelivr.net/joypixels/assets/8.0/png/unicode/64/1f600.png)
Bei diesem Quellcode zeigt der BRowser dies an:
Ich verstehe den Fehler nicht (falls ihn jemand mir erklärt bitte so tun statt einen link zur erklärung zu senden :)) und finde auch keinen in der Zeile :(Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in C:\Dokumente und Einstellungen\Richard\Desktop\xampp\htdocs\regwork.php on line 17
Hier der Code
PHP:
<?php
//Benutzerdaten
$firstname = $HTTP_POST_VARS['vorname'];
$name = $HTTP_POST_VARS['nachname'];
$birthyear = $HTTP_POST_VARS['gebjahr'];
//Accountdaten
$username = $HTTP_POST_VARS['username'];
$race = $HTTP_POST_VARS['volk'];
$email = $HTTP_POST_VARS['email'];
$password = $HTTP_POST_VARS['password'];
$secretquestion = $HTTP_POST_VARS['secretquestion'];
//Variabeln ermittelt.
//in die Datenbank eintragen.
$db = mysql_connect("localhost", "root", "")
or die("<script language=\"javascript\" type=\"text/javascript\">window.location.href = 'http://localhost/reg.php?error=noconnect&firstname=".$firstname."&name=".$name."&birthyear=".$birthyear."&username=".$username."&race=".$race."&email=".$email."&password=".$password."&secretquestion=".$secretquestion';</script>");
mysql_select_db("browsergame")
or die("<script language=\"javascript\" type=\"text/javascript\">window.location.href = 'http://localhost/reg.php?error=nodb&firstname=".$firstname."&name=".$name."&birthyear=".$birthyear."&username=".$username."&race=".$race."&email=".$email."&password=".$password."&secretquestion=".$secretquestion';</script>");
$anfrage = "INSERT INTO userbenutzerdaten VALUES ('";
$anfrage.= $firstname;
$anfrage.= "', '";
$anfrage.= $name;
$anfrage.="', '";
$anfrage.= $birthyear;
$anfrage.="', '";
$anfrage.= $username;
$anfrage.="', '";
$anfrage.= $race;
$anfrage.="', '";
$anfrage.= $email;
$anfrage.="', '";
$anfrage.= $password;
$anfrage.="', '";
$anfrage.= $secretquestion;
$anfrage.="')";
mysql_query($anfrage)
or die("<script language=\"javascript\" type=\"text/javascript\">window.location.href = 'http://localhost/reg.php?error=noconnect&firstname=".$firstname."&name=".$name."&birthyear=".$birthyear."&username=".$username."&race=".$race."&email=".$email."&password=".$password."&secretquestion=".$secretquestion';</script>");
print("Regestrierung erfolgreich abgschlossen");
?>
PHP:
or die("<scriptlanguage=\"javascript\"type=\"text/javascript\">window.location.href='http://localhost/reg.php?error=nodb&firstname=".$firstname."&name=".$name."&birthyear=".$birthyear."&username=".$username."&race=".$race."&email=".$email."&password=".$password."&secretquestion=".$secretquestion';</script>");
mfg web_spider
![Big Grin :D :D](https://cdn.jsdelivr.net/joypixels/assets/8.0/png/unicode/64/1f600.png)