Page is a not externally linkable
- Code, Content, and Presentation
-- Databases
---- Sql Injection virus problem.


edacsac - 3:04 pm on May 30, 2008 (gmt 0)


"(BAD BAD BAD DON'T DO IT)
mysql_query("SELECT * FROM table WHERE id=" . $_GET[id]); "

I use this style of select all the time, but before $_GET or $_POST vars end up in a query, I iterate through both arrays with a common function that strips, cleans and where nessecarry allows arguments for custom stripping.


Thread source:: http://www.webmasterworld.com/databases_sql_mysql/3657200.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com