diff --git a/components/register/main.php b/components/register/main.php index 6b128d7..dda6fad 100644 --- a/components/register/main.php +++ b/components/register/main.php @@ -1,5 +1,6 @@ prepare("INSERT INTO users (firstName, lastName, email, password) VALUES (:firstName, :lastName, :email, :password)"); + $query->bindParam(':firstName', $_POST['firstName']); + $query->bindParam(':lastName', $_POST['lastName']); + $query->bindParam(':email', $_POST['email']); + $query->bindParam(':password', password_hash($_POST['password'], PASSWORD_DEFAULT)); + $query->execute(); + + header("Location: login.php"); + exit(); + } } }