MemphiS Posted July 13, 2007 Share Posted July 13, 2007 Just wondering...if i was to do something like: <?php foreach ($_POST as $value){ strip_tags(addslashes($value)) } ?> Would that cover every $_POST on every page? instead of having to place strip_tags(addslashes()); on all inputs i create.. ??? Link to comment https://forums.phpfreaks.com/topic/59793-foreach-statement/ Share on other sites More sharing options...
Yesideez Posted July 13, 2007 Share Posted July 13, 2007 $_POST[$value]=strip_tags(addslashes($value)); I think thats right. Link to comment https://forums.phpfreaks.com/topic/59793-foreach-statement/#findComment-297276 Share on other sites More sharing options...
MemphiS Posted July 13, 2007 Author Share Posted July 13, 2007 hmm that would save alot of time Link to comment https://forums.phpfreaks.com/topic/59793-foreach-statement/#findComment-297278 Share on other sites More sharing options...
MemphiS Posted July 13, 2007 Author Share Posted July 13, 2007 Would this create greater server resource usuage though? hmm ??? Link to comment https://forums.phpfreaks.com/topic/59793-foreach-statement/#findComment-297283 Share on other sites More sharing options...
infid3l Posted July 13, 2007 Share Posted July 13, 2007 Would this create greater server resource usuage though? hmm ??? Not much at all, unless you have tons of POST data coming in. Keep in mind this will only take up any resources when someone is POSTing, otherwise it does next to nothing. Link to comment https://forums.phpfreaks.com/topic/59793-foreach-statement/#findComment-297311 Share on other sites More sharing options...
GingerRobot Posted July 13, 2007 Share Posted July 13, 2007 Well, if you're only retrieving data from the post array then its not a problem is it? Link to comment https://forums.phpfreaks.com/topic/59793-foreach-statement/#findComment-297392 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.