2718.us blog » magic_quotes http://2718.us/blog Miscellaneous Technological Geekery Tue, 18 May 2010 02:42:55 +0000 en hourly 1 http://wordpress.org/?v=3.0.4 Note to Self: Validate Input before using it in SQL Queries http://2718.us/blog/2008/04/15/note-to-self-validate-input-before-using-it-in-sql-queries/ http://2718.us/blog/2008/04/15/note-to-self-validate-input-before-using-it-in-sql-queries/#comments Tue, 15 Apr 2008 18:53:51 +0000 2718.us http://2718.us/blog/?p=21 Right, of course, I should be doing this already, but having magic quotes in PHP4 may hvae made me a bit lazy in some instances, and just like I’ve been going through and fixing register_globals dependence… As I read here,

Both register_globals and Magic Quotes were implemented in PHP to help beginners who were learning to program in PHP or new to programming in general. One thing I noticed about the upgrade was that neither of the problems I encountered were major, but also that they weren’t related to the actual upgrade to version 5, as they both should have been taken care of already. It brings up the discussion of a good programmer versus a bad/lazy programmer. Most of the sites that had any issues, and the few that had major issues were ones that I had taken over and was hosting but didn’t initially create. The sites were not built so long ago that there was an excuse for using both register_globals and magic quotes, and it shows that having programming standards is important, and that keeping up to date with programming trends and upgrades to the programming language are very important. I’m glad I caught this before I upgraded to verion 6 when I possibly would have had a much harder time solving the problem.

]]>
http://2718.us/blog/2008/04/15/note-to-self-validate-input-before-using-it-in-sql-queries/feed/ 1