Advertisement
Guest User

Untitled

a guest
Aug 24th, 2019
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.79 KB | None | 0 0
  1. public function newRegistration($firstname, $lastname, $email, $password, $gender) {
  2.         $vkey = time().$firstname;
  3.  
  4.         $stmt = Kernel::getInstance()->getPdo()->prepare("INSERT INTO interns (firstname, lastname, email, password, gender, vkey) VALUES (?, ?, ?, ?, ?, ?)");
  5.         $stmt->execute([$firstname, $lastname, $email, password_hash($password, PASSWORD_DEFAULT), $gender, $vkey]);
  6.  
  7.         $subject = "Adopte un stage - Validation de votre compte";
  8.         $body = "Bonjour, $firstname.
  9.        <br>Nous avons bien reçu votre demande d'inscription !
  10.        <br>Afin de finaliser votre inscription, <a href='http://localhost:8888/Adopteunstage-main/public/interns/welcome&vkey={$vkey}'>cliquez ici</a> !";
  11.  
  12.         Kernel::getInstance()->sendEmail($email, $subject, $body);
  13.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement