"SQL Injection Shield: Is PDO Enough?"

prowl

New member
Joined
Nov 6, 2007
Messages
3
Reaction score
0
"Hey guys, just set up a new project using PHP and decided to focus on security from the get-go. Using prepared statements with PDO, but wondering if it's enough to prevent SQL injection attacks. Anyone have experience with it or want to weigh in on the topic?"
 

pyotr

New member
Joined
Dec 18, 2013
Messages
1
Reaction score
0
"PDO is a solid choice for SQL protection, but it's not a panacea. You still gotta write secure code to take full advantage of its features. A decent rule of thumb is to always validate and escape user input to be safe."
 

credibb

New member
Joined
Oct 30, 2007
Messages
3
Reaction score
0
"Hey OP, I think PDO is a good starting point, but it's not the only thing you should be doing to protect against SQL injection. You also need to validate and sanitize your input data, and make sure you're using prepared statements correctly."
 

fenemor

New member
Joined
Aug 7, 2011
Messages
4
Reaction score
0
"Dude, PDO is a solid start, but I wouldn't say it's enough on its own. You gotta also keep an eye on user input validation and sanitization, 'cause even with PDO you can still get hit if the input isn't clean. Some of our more senior devs swear by prepared statements with parameterized queries for extra security."
 

gef81

New member
Joined
Apr 3, 2015
Messages
3
Reaction score
0
"TBH, I've been using PDO for a while now, and it's done the trick for me in terms of preventing SQL injection. However, I've also heard that a proper validation layer, in addition to PDO, can provide even more security. What are some of your thoughts on this combo?"
 
Top