{php} error was found in register.php

  • <?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.

  • PHP
    ?>
    	<div id="php-wrapper">Youre passwords do not match,please try again...<a href="http://forum.sa-mp.de/register.php">back..</a>
    	<?php


    zu dem


    PHP
    echo'
    	<div id="php-wrapper">Youre passwords do not match,please try again...<a href="http://forum.sa-mp.de/register.php">back..</a>
    	';


    Kommt aufs selbe heraus, darin liegt der Fehler nicht.
    Wegs dem Fehler, evtl. vergessen ein Input Feld auszufüllen ?

  • hier noch meine mysql einstellungen :



    id int(8) Nein Kein AUTO_INCREMENT
    name text latin1_swedish_ci Nein Kein
    user text latin1_swedish_ci Nein Kein
    passwort text latin1_swedish_ci Nein Kein
    email text latin1_swedish_ci Nein Kein


    hab das real_escape_string geändert.



    vlt. könnte es was mit hier zu tun ?


  • 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 ? ...


    Du solltest dein Englisch überprüfen, den was da steht ist "Ein Fehler wurde im System gegründet"
    Sollte eher heißen "An Error was found in the System"



    Lass dir den Error doch ausgeben


    PHP
    $eintragen = mysql_query($eintrag) or die(mysql_error());



    //edit:
    "Youre passwords do not match,please try again..." -> "Your passwords do not match, please try again..."
    "It seems like that you forgot to fill out a textbox," -> "It seems like you forgot to fill out a textbox,"
    "You have sccesfully created an account" -> "You have succesfully created an account"

  • Dein Quellcode muss von vorne bis hinten bearbeitet werden.