Déjà un compte ? Se connecter
prepare("INSERT INTO users(username, password, registration_date) VALUES(:username, :password, :registration_date)"); $stmt->bindValue(':username', $_POST['username']); $stmt->bindValue(':password', hashPassword($_POST['password'])); $stmt->bindValue(':registration_date', date("Y-m-d H:i:s")); $stmt->execute(); $_SESSION['username'] = $_POST['username']; redir(); success("Compte créé.");