All pastes #224763 Raw Edit

Anonymous

public text v1 · immutable
#224763 ·published 2006-10-27 15:46 UTC
rendered paste body
// ### Prepare variable for MySQL #####################
// First, make sure there aren't any slashes. Then escape special chars (including quotes!)
function prep_sqlvar($var)
{
        // Stripslashes
        if(get_magic_quotes_gpc())
        {
                $var = stripslashes($var);
        }
        $var = mysql_real_escape_string($value);
        return $var;
}