PHP & mySQL: When exactly to use htmlentities?
Here’s the general rule of thumb. Escape variables at the last possible moment. You want your variables to be clean representations of the data. That is, if you are trying to store the last name of someone named “O’Brien”, then you definitely don’t want these: O'Brien O\’Brien .. because, well, that’s not his name: there’s … Read more