Guest User

Untitled

a guest
Jun 12th, 2018
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.73 KB | None | 0 0
  1. <?php
  2. $host = 'localhost';
  3. $database = 'scrollsh_gallery';
  4. $username = 'scrollsh_gadmin';
  5. $password = ‘bitchslapper’;
  6.  
  7. $dsn = "mysql:host=$host;dbname=$database";
  8. // Connect
  9. $dbh = new PDO($dsn, 'scrollsh_gadmin', 'bitchslapper');
  10.  
  11.  
  12. $username = ($_POST['username']);
  13. $password = crypt(($_POST['password']));
  14. $email = ($_POST['email']);
  15.  
  16. $loginlength = strlen($username);
  17. $passlength = strlen($password);
  18. $emaillength = strlen($email);
  19.  
  20. $sth = $dbh->prepare("INSERT INTO users (username, password, email) VALUES (:username, :password, :email) ");
  21. $sth->bindParam(':username', $username);
  22. $sth->bindParam(':password', $password);
  23. $sth->bindParam(':email', $email);
  24. $sth->execute();
  25. $dbh = null;
  26.  
  27. echo "worked";
  28. ?>
Add Comment
Please, Sign In to add comment