SHARE
TWEET

Untitled

a guest May 26th, 2019 104 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. $username = "";
  3. $email = "";
  4.  
  5. if(isset($_POST['username'], $_POST['email'], $_POST['password'], $_POST['password_repeat'])) {
  6.   if($_POST['password'] == $_POST['password_repeat']) {
  7.   §register_statement = $pdo->prepare("INSERT INTO users_users (username, password, email, usergroup) VALUES (:username, :password, :email, 'guest')");
  8.  
  9.   $username = htmlspecialchars($_POST['username']);
  10.   $email = htmlspecialchars($_POST['email']);
  11.   $password = htmlspecialchars($_POST['password']);
  12.  
  13.   $register_statement->bindParam("username", $username);
  14.   $register_statement->bindParam("password", $password);
  15.   $register_statement->bindParam("email", $email);
  16.  
  17.   $register_statement->execute();
  18.  
  19.   echo('<div class="alert alert-sucess" role="alert">Dein Account wurde erstellt!</div>');
  20.  
  21. }else {
  22.   $username = $_POST['username'];
  23.   $email = $_POST['email']
  24.   ;echo('<div class="alert alert.danger" role="alert">Die Passwörter stimmen nicht überein!</div>');
  25.   }
  26. }
  27.  
  28.  ?>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top