Welcome Guest, Not a member yet? Register   Sign In
escape or escape_str
#3

[eluser]berkan[/eluser]
Thanks for reply.

Why does escape function adds single quotes to the string value. If I modify, will that be a security problem.


Code:
function escape($str)
    {    
        switch (gettype($str))
        {
            case 'string'    :    $str = "'".$this->escape_str($str)."'";
                break;
            case 'boolean'    :    $str = ($str === FALSE) ? 0 : 1;
                break;
            default            :    $str = ($str === NULL) ? 'NULL' : $str;
                break;
        }        

        return $str;
    }


Messages In This Thread
escape or escape_str - by El Forum - 04-25-2009, 07:19 PM
escape or escape_str - by El Forum - 04-26-2009, 04:43 AM
escape or escape_str - by El Forum - 04-26-2009, 06:28 AM
escape or escape_str - by El Forum - 04-26-2009, 06:48 AM
escape or escape_str - by El Forum - 04-26-2009, 06:57 AM



Theme © iAndrew 2016 - Forum software by © MyBB