first commit

This commit is contained in:
2025-02-11 16:14:49 +00:00
commit af0b1de88c
12 changed files with 1002 additions and 0 deletions

18
adduser.php Normal file
View File

@@ -0,0 +1,18 @@
<?php
// Example to add a user with hashed password
include("functions.php");
$conn = connectDb();
$username = 'fire';
$password = 'egfh2204'; // Plain password, to be hashed
$hashedPassword = password_hash($password, PASSWORD_DEFAULT);
// Insert the user into the users table
$stmt = $conn->prepare("INSERT INTO users (username, password) VALUES (?, ?)");
$stmt->bind_param("ss", $username, $hashedPassword);
$stmt->execute();
$stmt->close();
echo "User added successfully!";
$conn->close();
?>