C'mon. Their "PHP MySQL Insert Into" tutorial (http://w3schools.com/php/php_mysql_insert.asp) uses direct $_POST data with no escaping. No mention of security is made in the entire "PHP Database" section.
These tutorials need a massive red flashing warning saying "we've left critical stuff out, you will get your site defaced if you code like this".
Newbies don't need to be expected to know good code. That's no excuse for presenting actively dangerous examples to them with no warning.
How are people supposed to know that they need to go and find a separate security tutorial (and not a W3Schools one, they don't have one)?
Following that tutorial introduces massive security holes into a site. Those security problems need to be discussed. At the very least they need a warning saying "Don't do this until you understand the security issues discussed in THIS OTHER GUIDE".
So true. Imagine your primary school art teacher telling you you were ignoring centuries of established neo-classical techniques by holding the brush wrong.
The problem is nuance, which involves all those little wow-I-wish-I-knew-THAT tidbits that students never learn about until a forum member or colleague hollers at them.
Languages cannot eliminate every subtlety in their use, and there will always be issues that call for more articles explaining how to sidestep them. Novices won't normally get to see this content, and it won't help them to shove it all down their throats at once back at the introductory level courses.
There's a reason most physics students hear about Newton first.
These tutorials need a massive red flashing warning saying "we've left critical stuff out, you will get your site defaced if you code like this".
Newbies don't need to be expected to know good code. That's no excuse for presenting actively dangerous examples to them with no warning.