I need someone to write a PHP function that will check the input I have from a POST variable. The check input function will need to check different levels or types of input. I will pass the string, and the type, and then get returned the fixed string or error when applicable.
1. alpha/numeric only ( ex. [0-9A-Za-z] ) for passwords
2. email only (verify this should be valid email with no destructive
3. url link: a url link that does not contain destructive code
4. everything except code (java, php, html, etc) that could cause
me problems. They should be able to use the word "don't" so allow
them to use apostrophe and other things needed in common language
just not code that will mess up or hack my server. Special
characters need to be escaped to be sql safe.
5. number 4, except in this case we will allow them to use html code