I have a script that processes user input and before it continues with database interaction it verifies input with regex. My only question is, Is regex enough to weed out injection attacks or do I still need to apply mysql_real_escape_string()?
I have a script that processes user input and before it continues with database
Share
It really depends on how “good” the expression is; as in, “did you cover all your bases?” It doesn’t hurt to put it through
mysql_real_escape_stringto be safe. There is no performance impact if you use this a few times in your script.