Hi! I got a problem: The server im running my scripts on has <magic_quotes_gpc=ON>. I know, that i just have to stripslashes() the GPC data. But what if <magic_quotes_sybase> is also set ON? The doc says, that in this case only <'> is replaced by <''>, and nothing happens to <">, <\> and NUL, because <magic_quotes_sybase> overwrites <magic_quotes_gpc> behavior. Unfortunately, the doc says nothing about the case <magic_quotes_gpc=OFF> PLUS <magic_quotes_sybase=ON>. Does in this case nothing happen to GPC data, as <magic_quotes_gpc> is set OFF? Or does it result in the same <'> to <''> replacement, as <magic_quotes_sybase> is set ON? What's <sybase>, anyway?
I was about to implement a function as follows: function stripslashes_mq_gpc($txt){ if(get_magic_quotes_gpc()==1){ if(get_ini("magic_quotes_sybase")==1){ $txt=preg_replace("/('')/musi","'",$txt); // rather use str_replace() ?? }else{ $txt=stripslashes($txt); } } return $txt; } The same is to be done for <magic_quotes_runtime>, but there's nothing written about the interaction of <magic_quotes_runtime> and <magic_quotes_sybase>. So, could anyone help me, please? Thanks, Kai aka Christopher-Robin PS: Apologies for my bad english. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php