preventing sql injection in php

This question already has an answer here:

  • How can I prevent SQL injection in PHP? 28 answers

  • There is extensive information through simple Google searches that can guide you in the right direction. To start though:

    DON'T USE MYSQL_* FUNCTIONS These are deprecated and will generate warnings. They are not even remotely good practice for modern web development.

    USE A DATABASE LIBRARY INSTEAD like PDO or MySQLi. There's plenty of tutorials to get you started and most importantly these libraries take care of SQL injection for you . So use them!

    链接地址: http://www.djcxy.com/p/2740.html

    上一篇: 如何防止sql注入? 而不用修改成SQL查询

    下一篇: 防止在PHP中的SQL注入