Php – How to safely escape the input data in php for thesql

mysqlphp

Which means, at the moment, are the safest for screening data in php to send them to the mysql database.

Thank, you )

Best Solution

I believe mysql_real_escape_string() mysqli_real_escape_string() is the best way to escape input data

Later edit since everything is deprecated now and information must be valid:

Try to use PDO as prepared statements are much safer or mysqli_*() functions if you really need to keep old code somewhat up-to-date.