I know, cuz i already rebuild it.
A bug: with a code you can login to the administration panel.
And i already tried it & only what i saw was PHP Error's.
what are you trying to achieve with that piece of code? What you are doing is not preventing mysql injection, you are just checking strings for malicious words. If you want to prevent your SQL queries from being injected, just use mysql_real_escape_string function, easy as that...
Using MVC standards have not much to do with preventing sql injections. A Database abstraction layer is an option, but hardly something he should be looking into seeing the kind of code he's doing atm. Just going for prepared statements is step 1 for him.
Of course, most likely in his situation it doesn't matter. Doesn't change the fact that it's still bad practice which you shouldn't get used to. You never know where a piece of code might end up and what nationalities will end up working with it.
also variable $locatie has not been set anywhere in the above script
A bug: with a code you can login to the administration panel.
And i already tried it & only what i saw was PHP Error's.
If i fix 1 error i will get another one & etc.
So i deleted that shit.
He (well, actually anyone that does queries to a database) should use parameterized queries. (prepared statements)
http://www.php.net/manual/en/pdo.prepared-statements.php
i sometimes use foreign language file and variable names when writing stuff for myself, as long as i know what it means i doubt it matters
The programming language is in english, hence the variables should also be in english. End of discussion :)