Okay I was wondering when should I sanitize my code, when I add store it in the database or when I have it displayed on my web page or both?
I ask this question beca
You should always encode data when you display it. This way your application can do no wrong. This will protect you from bad data no matter how it came to be.