Parameterized queries in PHP with MySQL connection

前端 未结 2 1254
一向
一向 2020-12-07 02:10

I\'ve read about SQL injection so I tried it with my site and of course it worked.. I know that the solution is parameterized queries and I also know that there are a lot of

2条回答
  •  伪装坚强ぢ
    2020-12-07 02:39

    use:

    $userPass = mysqli_real_escape_string($mysqli,$_POST["password"]);
    

    This block the '' or '=' thing thing :) where $mysqli is your connection string ofc.

提交回复
热议问题