@ratfox
If I recall correctly, the mysqli functions for PHP 5 only allow one query to be run per call to query(), so even if the developer was stupid and didn't cleanse his inputs (and there are many ways to do so) then there's not a guarantee of the site being taken over. (Still doesn't stop malicious OR queries in logins for example, but nevertheless it seems a step in the right direction.) Another thing that bugs me is cPanel's MySQL database setup automatically checks All Privs for when you add a new user to a database. If you're only going to be selecting records, only allow the database user to select records.
Perhaps all books and classes for web design, especially scripting, need to be required to give a large nod to security before being eligible for publication. There's not really a way to regulate internet tutorials, save perhaps something like a "W3C compliant tutorial" label that is given out to those who can prove they demonstrate proper practices. Add a back-link to it to W3C for verification.
And I don't usually like to bash languages (all right, I have fun poking fun at Java every now and again), but it seems to me that the fact that this is happening a lot with ASP and MS servers suggests either a large pool of dummies using those technologies, or the technologies themselves being horribly inferior to the open alternatives.


