<?php
try
{
$bdd = new PDO('mysql:host=localhost;dbname=stack;charset=utf8', 'root', 'root');
}
catch (Exception $e)
{
die('Erreur : ' . $e->getMessage());
}
$email = filter_input(INPUT_POST, 'email');
$password = filter_input(INPUT_POST, 'password');
$emaildata = "SELECT email FROM stacktable";
$passworddata = "SELECT password FROM stacktable";
if ( $email == $emaildata && $password == $passworddata){
echo "success";
}
else{
echo "failed";
}
?>