Update file register.php

This commit is contained in:
Jan BELLON 2024-03-07 20:25:38 +00:00
parent 3ac9945a46
commit 2c845f0e4f

View File

@ -19,6 +19,8 @@ if(isset($_POST['username']) && isset($_POST['password']) && isset($_POST['passw
$req = $bdd->prepare("INSERT INTO users (username, password, email, display_name, role) VALUES (:username, :password, :email, :display_name, 0)");
$req->bindParam(':username', htmlspecialchars($_POST['username']));
$req->bindParam(':password', md5($_POST['password']));
$req->bindParam(':email', htmlspecialchars($_POST['email']));
$req->bindParam(':display_name', htmlspecialchars($_POST['display_name']));
if ($req->execute()) {
header("Location: login.php");
exit();