View sourcecode

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

save_user.php

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