Do you have something to do in code, design or animation and you don't know how? Send us an e-mail and will do a tutorial which will solve your problem.
Documentations for any level of knowledge, from beginners to advanced programmers, and even for those who just want a 'piece of code'
A simple way to protect against code injection
+ Share and Enjoy
Author: Cristea Iulian
1 from 9 vots
Vote this article
A simple way to protect against code injection is that you can verify variables before entering them into database for a few words that can damage your database.
The most dangerous words are: select, update, insert and delete, those that can retrieve, modify or insert data into your application.
You can either replace these words resulting a dead code or deny them if used.
Here is the code that you can use, as example for a username field: