Jump to content

Recommended Posts

Hi guys.
I can't register at my own website. I don't see where the error comes from.
I will leave you here my script. So that you can help me.

<?PHP
    
    require ('config/config.inc.php');
    
    if(isset($_POST['register'])) {    
        
        if(empty($_POST['benutzername']) && empty($_POST['passwort']) && empty($_POST['email']) && empty($_POST['lieblingsfarbe'])) {
            echo '<p>Bitte alle Felder ausfüllen!</p>';
        }
        elseif(preg_match('/^a-zA-Z0-9@-._ÖöÄäÜü/', $_POST['benutzername']) && preg_match('/^a-zA-Z0-9@-._ÖöÄäÜü/', $_POST['passwort']) &&
                preg_match('/^a-zA-Z0-9@-._ÖöÄäÜü/', $_POST['email']) && preg_match('/^a-zA-Z0-9@-._ÖöÄäÜü/', $_POST['lieblingsfarbe'])) {
            echo '<p>Es ist nur: a-Z,0-9,@,.,_,- erlaubt!</p>';
        }
        else {
            $benutzername = mysqli_real_escape_string($con, $_POST['benutzername']);
            $passwort = mysqli_real_escape_string($con, $_POST['passwort']);
            $email = mysqli_real_escape_string($con, $_POST['email']);
            $antwort = mysqli_real_escape_string($con, $_POST['lieblingsfarbe']);
        }
        
        $sql = "INSERT INTO account.account
                (login, password, social_id, email, create_time, question1, answer1, status, safebox_expire, autoloot_expire, coins)
                VALUES
                ('" . $benutzername . "', PASSWORD('" . $passwort . "'), '" . $loeschcode . "', '" . $email . "', '" . $zeit . "', '" . $frage . "',
                '" . $antwort . "', '" . $status . "', '" . $date . "', '" . $date . "', '" . $registercoins . "')";
        $qry = mysqli_query($con, $sql);
    
        if($qry) {
            echo '<p id="nachricht" style="color:green;">Conta criada com sucesso!</p>';
        }
        else {
            echo '<p id="nachricht" style="color:red;">Registo falhou!</p>';
        }
    }
?>

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now


×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.