View sourcecode

The following files exists in this folder. Click to view.

update_user.php

15 lines ASCII Unix (LF)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<?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();
?>