为什么当我输入好的密码和电子邮件程序时我失败了?

时间:2019-06-17 01:02:39

标签: php database connect

<?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";

    }

?>

0 个答案:

没有答案