Is SQL injection a risk today? Is SQL injection a risk today? php php

Is SQL injection a risk today?


Quite the contrary. Magic quotes are deprecated in PHP5 and will be completely removed in PHP 5.4, as they brought more confusion to the programming world than they did good. Checking whether magic quotes are active, and escaping any SQL input scrupulously if necessary, is still very, very important... No reason to feel bad though, we've all been there, and my unknowing ass has been saved by magic quotes countless times :)

The PHP manual on magic quotes explains everything.


No this is still very relevant.

As are XSS and CSRF. Never underestimate the importance of proper input filtering.


Heh, you're saved in this case by having magic_quotes_gpc set to "on".

You'll be screwed soon.