Re: Magic quotes question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I'm not quite sure I understand you...

The theory behind that function looks sound, but are you meaning to return the value or pass it by reference and modify it?

Chris

Ben Edwards wrote:

OK.  This is really confusing me.

I am using the following function to handle this:

function prep( &$text ) { echo get_magic_quotes_gpc()." ";
if (get_magic_quotes_gpc()) {
echo "mq on for $text";
return $text; } else {
echo "mq off";
return addslashes($text);
}
}


And it is not doing the assslashes but stuff like \'s is still being
added.  wonce savein a few times I get \\\\\'.

Ben




-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux