时间:2021-07-01 10:21:17 帮助过:6人阅读
error_reporting(0);
$dsn = "mysql:host=localhost;dbname=liuyan";
$db = new PDO($dsn, 'root', 'root');
$name = $_POST['name'];
$password = md5($_POST['password']);
//$date = date("Y-m-d H:i:s");
$sql = "select * from admin where user_name=? and password=?";
$stm = $db->prepare($sql);
$stm->execute(array($name,$password));
$rs=$stm->fetch();
var_dump($rs);
if(empty($rs)){
echo "";
} else{
echo "";
}
?>