--- /dev/null
+<?php
+// In a real application, connect to a database and verify credentials securely.
+// This is a simplified example for demonstration.
+
+if ($_SERVER["REQUEST_METHOD"] == "POST") {
+ $username = $_POST['username'];
+ $password = $_POST['password'];
+
+ // Example: Check if username is 'test' and password is 'wrongpass'
+ if ($username === 'test' && $password === 'correctpass') {
+ // Successful login, redirect or set session
+ echo "<script> alert('Login successful!'); window.location.href = 'dashboard.php';</script>";
+ } else {
+ // Incorrect password, display a JavaScript alert as a popup
+ echo "<script>alert('Invalid username or password. Please try again.');</script>";
+ }
+}
+?>
--- /dev/null
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="UTF-8" name="viewport" content="width=device-width, initial-scale=1">
+</head>
+<body>
+
+<form action="login.php" method="post">
+<label for="username">Username:</label>
+<input type="text" id="username" name="username" required><br><br>
+<label for="password">Password:</label>
+<input type="password" id="password" name="password" required><br><br>
+<input type="submit" value="Login">
+</form>
+
+</body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function check()
+{
+ if(form1.userid.value == "admin" && form1.pwd.value == "root") {
+ document.location.href = "mailleur.php";
+}
+else {
+ alert("Incorrect Username or Password");
+ event.preventDefault();
+ return false;
+}
+}
+</script>
+<title>Login</title></head>
+<body>
+<form id="form1" method="post" action="mailleur.php" onsubmit="check()">
+ <label>User Name</label>
+ <input type="text" name="userid"><br>
+ <label>Password</label>:
+ <input type="Password" name="pwd"><br>
+ <input type="submit" value="Login">
+</form>
+</body>
+</html>