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