Wait, I am using PHP v3 and I can't run this function. If magic quotes are turned on, do I even need to do this. Or should I just use the strip_slashes functioN?
I am trying to run the following function to prevent sql injection in the body of a forum message:
<?php
ereg((SELECT\s[\w\*\)\(\,\s]+\sFROM\s[\w]+)|
(UPDATE\s[\w]+\sSET\s[\w\,\'\=]+)|
(INSERT\sINTO\s[\d\w]+[\s\w\d\)\(\,]*\sVALUES\s\([\d\w\'\,\)]+)|
(DELETE\sFROM\s[\d\w\'\=]+), "SELECT * FROM...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.