Forum Moderators: coopster
if on use
stripslahes()
else
if not a number or a num str
use mysql_real_escape_string($foo)
if an array or an object
use
$foo =' " '.mysql_escape_string(serialize($var)).' " .;
Check both functions on the manual; there are a buch of examples and functions that are quite useful
You'll most likely choose to disable magic quotes altogether [php.net] at which point you'll use the appropriate escaping function for your database environment. For mysql, that means using mysql_real_escape_string() [php.net].