0
I’m making a login simple here via Sqlite, but at the time of pressing the "Login" button, says that there is no ("Login Failed") everything is correct on the form;
$sqlite = "sqlite:teste.db";
$pdo = new PDO($sqlite);
$username = $_POST['login_username'];
$password = $_POST['login_password'];
$login=$pdo->prepare("SELECT * FROM users WHERE Email= :username AND password= :password");
$login->bindValue(":username",$username);
$login->bindValue(":password",$password);
$login->execute();
if(isset($_POST['login_btn'])){
if($login->rowCount()==1){
echo "Logged In";
}else{
echo "Login Failed";
}
}
On the third line, put
$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
and see if any exceptions are cast.– Woss
No Gave, you wouldn’t happen to have another Sqlite login script?
– Jhonata Bonadio