Magic Quotes Removal code - almost there

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

 



The following code is passed $_POST to clean magic quotes code out ;_

function remove_magic_quotes( &$array ) {
	foreach( $array as $index => $value ) {
		if ( is_array( $array[$index] ) ) {
			remove_magic_quotes( $array[$index] );
		} else {
			if ( magic_quotes_runtime() ){
				echo "removing slashes $value<br />";
				$array[$index] = stripslashes( $value );
			}
		}
	}
}

The cleaning works but magic_quotes_runtime is false even if magic codes
are on, any ideas?

Ben
-- 
Ben Edwards - Poole, UK, England
If you have a problem sending me email use this link
http://www.gurtlush.org.uk/profiles.php?uid=4
(email address this email is sent from may be defunct)

Attachment: signature.asc
Description: This is a digitally signed message part


[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