You are here: Applying quote_smart() to Arrays « PHP Programming Language « IT news, forums, messages
Applying quote_smart() to Arrays

Posted by ashore on 10/09/07 00:06

Guys, I'm adapting the ..._deep() approach to apply it to $_GET and/
or $_POST arrays as follows, as a lazy way to cleanup input before
posting it to the database - to prevent SQL injections.

function quote_smart_deep($value) { // recursive array-capable
version of quote_smart
$value = is_array($value) ? array_map('quote_smart_deep',
$value) : quote_smart($value);
return $value;
}

Anyone see any reason for this not to work? Thanks, all.

-AS

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация