Added full user authentication system: register/login with validation, bcrypt, reCAPTCHA integration, session handling, and new landing page with animated form switcher.

This commit is contained in:
Dr3amFury
2025-07-29 19:22:49 +02:00
parent a2af4c3d1a
commit 08a5cead74
6 changed files with 159 additions and 57 deletions

4
db.php
View File

@@ -1,13 +1,13 @@
<?php
function getConnection() {
$host = getenv('DB_HOST') ?: 'localhost';
$port = 3308;
$port = 3308; // ✅ using custom port
$db = getenv('DB_NAME') ?: 'ai_email';
$user = getenv('DB_USER') ?: 'root';
$pass = getenv('DB_PASS') ?: '';
$charset = 'utf8mb4';
$dsn = "mysql:host=$host;dbname=$db;charset=$charset";
$dsn = "mysql:host=$host;port=$port;dbname=$db;charset=$charset";
$options = [
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,