Should I use mysqli_real_escape_string or should I use prepared statements? [duplicate]

Prepared statements only. Because nowhere escaping is the same thing. In fact, escaping has absolutely nothing to do with whatever injections, and shouldn’t be used for protection.

While prepared statements offer the 100% security when applicable.

Leave a Comment