The following files exists in this folder. Click to view.
save_user.php14 lines ASCII Unix (LF)
<?php
include("check_login.php");
include("db.php");
$username = $_POST['username'];
$password = $_POST['password'];
$stmt = $pdo->prepare("INSERT INTO users (username, password) VALUES (?, ?)");
$stmt->execute([$username, $password]);
header("location: users.php");
exit();
?>