PHP Anti-SQL code
Recently in learning, PHP MySQL
Next, after submitting the form, between inserting the database,
Is that enough to write? Do you want to write any other anti-SQL code?
$name =mysql_real_escape_string ($_post[' name ');
------to solve the idea----------------------
Baidu "360 Universal anti-injection" can be used as a reference
------to solve the idea----------------------
That's all you have to say.
------to solve the idea----------------------
References:
Quote: References:
Baidu "360 Universal anti-injection" can be used as a reference
O (∩_∩) o Thank you
Is there something wrong with me writing this?
OK
------to solve the idea----------------------
I've just learned. I think directly to learn PDO, with parameter query. Anyway, it's just starting to learn.
------to solve the idea----------------------
General use addslashes function; mysql_real_escape_string must be connected to the database before it can be used
------to solve the idea----------------------
1. The user's data must be digitally verified as a number
2.addslashes function
3.mysql_real_escape_string or Mysql_escape_string
4. Precompiled SQL Prepare
------to solve the idea----------------------
I think the use of 360safe is still good, there is time to study!!