Taylor Courage 4db53fbe75 BIG UPDATE
- Added admin panel
- Added user creation form
- Now connects to SQL
- Added option for DB (re)initialization
- Capable of writing user form to SQL
2025-03-01 07:43:59 -05:00

31 lines
930 B
PHP

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" />
<link rel="stylesheet" href="db_management.css" />
<!-- <script src="trojan.js"></script>-->
<title>TROJAN'S GENERAL DATA SHIT</title>
</head>
<body class="sqlOutput">
<?php
include("../dev_db_config.php"); // Include credentials
try { // Try opening the SQL database connection
$conn = new PDO("mysql:host=$servername;dbname=$dbName", $username, $password);
// set the PDO error mode to exception
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
echo "<p>Database connection successful!</p>";
echo "<p>If you're still having issues, talk to your system administrator, or file an issue with the package maintainer</p>";
} catch (PDOException $e) {
echo "Connection failed: " . $e->getMessage();
}
?>
</body>
</html>