Connecting Tech Pros Worldwide Help | Site Map

How to tell if escape behavior is turned on

  #1  
Old November 22nd, 2005, 12:05 AM
laredotornado@zipmail.com
Guest
 
Posts: n/a
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 22nd, 2005, 12:05 AM
Wojciech Bancer
Guest
 
Posts: n/a

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
Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
comp.lang.c Answers to Frequently Asked Questions (FAQ List) Steve Summit answers 0 November 14th, 2005 04:15 AM
comp.lang.c Answers to Frequently Asked Questions (FAQ List) Steve Summit answers 0 November 13th, 2005 11:37 PM
comp.lang.c Answers to Frequently Asked Questions (FAQ List) Steve Summit answers 0 November 13th, 2005 09:56 PM
comp.lang.c Answers to Frequently Asked Questions (FAQ List) Steve Summit answers 0 November 13th, 2005 03:15 AM