<?php
if(isset($_GET["page"])) {
if($_GET["page"] == "2") {
$user = mysql_real_escape_string(($_POST["user"]));
$name = $_POST["name"];
$email = $_POST["email"];
$pw = mysql_real_escape_string(md5($_POST["pw"]));
$pw2 = mysql_real_escape_string(md5($_POST["pw2"]));
if(empty($user) || empty($name) || empty($email) || empty($pw) || empty($pw2)){
?>
<div id="php-wrapper">It seems like that you forgot to fill out a textbox, would you like to try again ? ....<a href="register.php">back..</a>
<?php
}
if($pw != $pw2) {
?>
<div id="php-wrapper">Youre passwords do not match,please try again...<a href="register.php">back..</a>
<?php
} else {
$verbindung = mysql_connect("localhost", "user", "password")
or die ("Error was found in the system.");
mysql_select_db("databank")
or die ("the connection to the database was not able");
$control = 0;
$abfrage = "SELECT user FROM login WHERE user = '$user'";
$ergebnis = mysql_query($abfrage);
while($row = mysql_fetch_object($ergebnis))
{
$control++;
}
if($control != 0) {
?>
<div id="php-wrapper">Username is already taken...<a href="register.php">back..</a>
<?php
} else {
$eintrag = "INSERT INTO login
(name, user, passwort, email)
VALUES
('$name', '$user', '$pw', '$email')";
$eintragen = mysql_query($eintrag);
if($eintragen == true) {
?>
<div id="php-wrapper">You have sccesfully created an account, would you like to login?..<a href="index.php">login-page..</a>
<?php
} else {
?>
<div id="php-wrapper">An error was founded in the system, please try again..<a href="register.php">back..</a>
<?php
}
mysql_close($verbindung);
}
}
}
}
?>
ERROR, auf der website zeigt es an diese meldungen :
An error was founded in the system,please try again..
>It seems like that you forgot to fill out a textbox, would you like to try again ? ...
wenn mir jemand sagen könnte wieso es nicht funktz würde es echt nett sein ;),
mfg kyle.