Page is a not externally linkable
- Code, Content, and Presentation
-- PHP Server Side Scripting
---- filtering mysql queries


swa66 - 10:51 pm on Nov 9, 2012 (gmt 0)


preg_replace('/[^A-Za-z0-9-]/','', $search) sounds quite harsh on those who might need to support accented letters (read: non-english text).

But essentially the whitelist approach is the right way: only allow in what you know you can deal with, reject all the rest.


Thread source:: http://www.webmasterworld.com/php/4516699.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com