Q. How can you prevent SQL injection in PHP?

  • (A) Use prepared statements
  • (B) Use addslashes()
  • (C) Use htmlspecialchars()
  • (D) Use htmlentities()
πŸ’¬ Discuss
βœ… Correct Answer: (A) Use prepared statements
Explanation: Prepared statements prevent SQL injection by separating data from code.
Explanation by: Rati Dubey
Prepared statements prevent SQL injection by separating data from code.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
88
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Rati Dubey
Publisher
πŸ“ˆ
83%
Success Rate