Fixing Input
Posted: Wed Dec 27, 2006 2:12 pm
I want to make sure to fix all input from a <TEXTAREA> and text inputs. The data in the post will be going into a mySQL database.
Is there a preg_replace() or some other industry standard that is best to use, or are there multiple functions I should use.
Obviously, the general idea is to prevent backslashes, single quotes, double quotes, etc from causing the code to error out (I don't really have much control over the php.ini), and also to prevent injection and other forms of attack.
Any feedback would be greatly appreciated.
Is there a preg_replace() or some other industry standard that is best to use, or are there multiple functions I should use.
Obviously, the general idea is to prevent backslashes, single quotes, double quotes, etc from causing the code to error out (I don't really have much control over the php.ini), and also to prevent injection and other forms of attack.
Any feedback would be greatly appreciated.