View Full Version : Adding slashes on all of an array?
Decode
14-07-2008, 05:32 PM
How would it be done ive tried addslashes( $_POST ) but it doenst work :(
+rep
Oddsocks
14-07-2008, 05:53 PM
You'd have to probaly use foreach post array and split them into single results applying the addslashes to each one of them, although that may be incorrect.
Invent
14-07-2008, 06:00 PM
foreach( $_POST as $var => $val )
{
$$var = addslashes( $val );
}
Something like that :S
Agnostic Bear
15-07-2008, 01:13 PM
foreach( $_POST as $key => $value )
{
$_POST[ $key ] = addslashes( $value );
}
Works for get too.
Want to hide these adverts? Register an account for free!
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.