<?php
// Simple script to create the database

$servername = "localhost";
$username = "root";
$password = ""; // Add your MySQL password here if you have one

try {
    $pdo = new PDO("mysql:host=$servername", $username, $password);
    $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
    
    $pdo->exec("DROP DATABASE IF EXISTS ci4_login_system");
    $pdo->exec("CREATE DATABASE ci4_login_system");
    
    echo "Database recreated successfully\n";
} catch(PDOException $e) {
    echo "Connection failed: " . $e->getMessage() . "\n";
}
?>