What are some steps that can be taken to prevent SQL Injection? What functions should be applied to data going into a SQL query for mysql?
Currently I have register_globals turned off, use $POST, $GET, and LIMIT my querys. I'm still trying to find out which functions to apply to which types of information to make it SQL safe.
For example, what should you do for an ID used in a select, update, delete querys? What about for things that you are not going to be showing to users? Things that will be shown (posts on a forum, ect, ect).
What should be used to remove all html and javascript from the text to perfect XSS?