I'm trying to create a website that has a login page. I had connected a database which contains everyone name and passwords (we are 10 people, so I put all data on a database). After the login it should redirect you to another page, but it always returns false; despite this, I inserted all data correctly. Here's the code of the "if", thanks in advance for the help.
session_start();
if ($ArrRow["NomeUtente"]==$_POST["NomeUtente"] and $ArrRow["Password"]==$_POST["Password"]) {
$_SESSION["login"]=true;
echo "Login corretto";
echo "<meta http-equiv=refresh content=2;url=https://tpvgruppo.altervista.org/turni-settimanali/>";
} else {
$_SESSION["login"]=false;
echo "Login non corretto, riprova.";
echo "<meta http-equiv=refresh content=2;url=https://tpvgruppo.altervista.org/area-riservata/>";
}
Aucun commentaire:
Enregistrer un commentaire