user3237819
user3237819

Reputation:

Do I need mysqli_string_escape statement to avoid sql injection

Do I need mysqli_escape_string to avoid sql injection if I use mysqli prepared statement

Upvotes: 1

Views: 79

Answers (1)

Dany Caissy
Dany Caissy

Reputation: 3206

No you don't, prepared statements will ensure that your queries are sanitized properly.

In fact, prepared statements are the safest way to prevent injections, escaping is never 100% safe.

This explains why: Why is using a mysql prepared statement more secure than using the common escape functions?


Upvotes: 1

Related Questions