You are here: Re: The best way to protect SQL injection? « PHP Programming Language « IT news, forums, messages
Re: The best way to protect SQL injection?

Posted by Dikkie Dik on 12/26/06 19:33

> I wrote a simple PHP function for handling string arguments to a SQL
> Query:
>
> function SqlEscapedQuotedString($unescaped_string) {
> return '"' . addslashes($unescaped_string) . '"';
> }


For me, this is way too simple.I use "whitelisting" for the SQL values:
any character that is valid SQL is allowed (though escaped for some
characters), and a string containing any other character is sent as a
hexadecimal string.

Best regards

 

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

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