当前位置:Gxlcms > 数据库问题 > 防止SQL注入的方法

防止SQL注入的方法

时间:2021-07-01 10:21:17 帮助过:2人阅读

and passwd=:b ;";

      $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注入的方法

标签:

人气教程排行