daily pastebin goal
9%
SHARE
TWEET

Super Clean Signup

Stratician Feb 3rd, 2016 (edited) 94 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class Signup {
  2.    
  3.     protected $username;
  4.     protected $email;
  5.     protected $password;
  6.  
  7.     public function __construct($username, $email, $password)
  8.     {
  9.         $this->username = $username;
  10.         $this->email = $email;
  11.         $this->hashPass($password);
  12.     }
  13.  
  14.     protected function hashPass($hashedPass)
  15.     {
  16.         $this->password = password_hash($hashedPass, PASSWORD_DEFAULT);
  17.     }
  18. }
  19.  
  20. $newSignup = new Signup($_POST['username'], $_POST['email'], $_POST['password']);
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