A

Admin • 833.24K Points
Coach

Q. How can you prevent SQL injection in PHP?

  • (A) Use prepared statements
  • (B) Use addslashes()
  • (C) Use htmlspecialchars()
  • (D) Use htmlentities()
  • Correct Answer - Option(A)
  • Views: 28
  • Filed under category PHP
  • Hashtags:

Explanation by: Admin

Prepared statements prevent SQL injection by separating data from code.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.