<?php
require_once "config/db.php";

$username = "admin";
$password = "admin123";

// generate hash ONCE
$hash = password_hash($password, PASSWORD_DEFAULT);

$stmt = $conn->prepare("INSERT INTO users (username, password) VALUES (?, ?)");
$stmt->bind_param("ss", $username, $hash);

if($stmt->execute()){
    echo "Admin created successfully";
} else {
    echo "Error: " . $conn->error;
}
?>