How to tell if escape behavior is turned on

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • laredotornado@zipmail.com

    How to tell if escape behavior is turned on

    Hello,
    Is there a programmatic way in PHP (using PHP 4) to tell if the
    escaping apostraphes behavior is turned on when a request is submitted?
    What I would like to do is insert a value into my db table, but only
    apply escaping if PHP hasn't applied it for me ...

    $v = $_REQUEST['val'];

    if (escaping_disab led()) {
    $v = escape($v);
    }

    insertIntoDB($v );

    Thanks for any help, - Dave

  • Wojciech Bancer

    #2
    Re: How to tell if escape behavior is turned on

    laredotornado@z ipmail.com napisa³(a):
    [color=blue]
    > Hello,
    > Is there a programmatic way in PHP (using PHP 4) to tell if the
    > escaping apostraphes behavior is turned on when a request is submitted?
    > What I would like to do is insert a value into my db table, but only
    > apply escaping if PHP hasn't applied it for me ...[/color]
    [color=blue]
    > $v = $_REQUEST['val'];[/color]
    [color=blue]
    > if (escaping_disab led()) {
    > $v = escape($v);
    > }[/color]
    [color=blue]
    > insertIntoDB($v );[/color]

    Hmm... http://www.php.net/get-magic-quotes-gpc ? :)

    --
    Wojciech Bancer

    Comment

    Working...