Flatlogic Bot 6d48e88ec8 V1.0
2025-11-20 11:10:15 +00:00

23 lines
952 B
JavaScript

document.addEventListener('DOMContentLoaded', function() {
const loginForm = document.getElementById('loginForm');
if (loginForm) {
loginForm.addEventListener('submit', function(e) {
e.preventDefault();
// --- SIMULATED LOGIN ---
// In a real application, you would send this to a server for validation.
const email = document.getElementById('email').value;
const password = document.getElementById('password').value;
// Basic validation
if (email && password) {
// Simulate a successful login and redirect to the admin dashboard
console.log('Simulating successful login...');
window.location.href = 'admin.php';
} else {
// In a real app, you'd show a more specific error.
alert('Please enter both email and password.');
}
});
}
});