Connecting Tech Pros Worldwide Help | Site Map

How to tell if escape behavior is turned on

 
LinkBack Thread Tools Search this Thread
  #1  
Old November 21st, 2005, 11:05 PM
laredotornado@zipmail.com
Guest
 
Posts: n/a
Default 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_disabled()) {
$v = escape($v);
}

insertIntoDB($v);

Thanks for any help, - Dave


  #2  
Old November 21st, 2005, 11:05 PM
Wojciech Bancer
Guest
 
Posts: n/a
Default Re: How to tell if escape behavior is turned on

laredotornado@zipmail.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_disabled()) {
> $v = escape($v);
> }[/color]
[color=blue]
> insertIntoDB($v);[/color]

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

--
Wojciech Bancer
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,989 network members.