时间:2021-07-01 10:21:17 帮助过:2人阅读
$stmt=$pdo->prepare($sql);
$stmt->execute(array(:a=>$username,:b=>$passwd));
占位符形式2??:
$username=$_POST(username);
$passwd=$_POST(passwd);
$sql="select * from users where username=? and passwd=? ;";
$stmt=$pdo->prepare($sql);
$stmt->execute(array($username,$passwd));
防止SQL注入的方法
标签: