Possible Duplicate:
Best way to stop SQL Injection in PHP
I’m curious what all functions I should run on a text string that’s a quote before I store it in my database.
I want to handle it if it has single quotes contained in it as well as other double quotes or anything else.
in terms of php you should use
trim() and stripslashes()and if you are using mysql thenmysql_real_escape_string()you can use them in this order:
first
stripslashes()thentrim() then