preventing sql injection in php
This question already has an answer here:
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下一篇: 防止在PHP中的SQL注入