PLATFORM: PHP & mySQL
For my experimentation purposes, I have tried out few of the XSS injections myself on my own website. Consider this situat
Theoretically you may do htmlentities before inserting to DB, but this might make further data processing harder, if you would need original text.
3. See above