Mini Kabibi Habibi

Current Path : C:/xampp/htdocs/ict_schedule/
Upload File :
Current File : C:/xampp/htdocs/ict_schedule/create_admin.php

<?php
include 'includes/db.php';

// Set the desired username and password
$username = "admin"; // You can change this
$password = "ictunit1969"; // You can change this too

// Hash the password before storing
$hashedPassword = password_hash($password, PASSWORD_DEFAULT);

// Insert user into the database
try {
    $stmt = $pdo->prepare("INSERT INTO users (username, password) VALUES (?, ?)");
    $stmt->execute([$username, $hashedPassword]);
    echo "✅ Admin user created successfully. You can now log in.";
} catch (PDOException $e) {
    echo "❌ Error: " . $e->getMessage();
}