Accesso Utente
Accesso Utente
VALORE pagina login 1000 DI 1000
connect_error) {
die("Connection failed: " . $conn->connect_error);
}
// Get the form data
$username = $_POST["username"];
$password = $_POST["password"];
// Check if the username and password are correct
$sql = "SELECT * FROM users WHERE username='$username' AND password='$password'";
$result = $conn->query($sql);
if ($result->num_rows > 0) {
// Redirect to the main site
header("Location: main.html");
} else {
echo "Username or password is incorrect";
}
Commenti