A

Admin • 832.27K Points
Coach

Q. Which function is used to escape special characters in a string for use in an SQL statement?

  • (A) mysql_escape_string()
  • (B) addslashes()
  • (C) mysqli_real_escape_string()
  • (D) escape_string()
  • Correct Answer - Option(C)
  • Views: 13
  • Filed under category PHP
  • Hashtags:

Explanation by: Admin

mysqli_real_escape_string() is used to prevent SQL injection.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.