query("SELECT * FROM utenti WHERE username = '$username' AND password = MD5('$password')"); if ($result->num_rows > 0) { $row = $result->fetch_assoc(); $_SESSION["username"] = $row["username"]; $_SESSION["ruolo"] = $row["ruolo"]; header("Location: index.php"); exit(); } else { $message = "Credenziali non valide."; } } ?> Login

Login