Function to sanitize input to Mysql database?

Htmlentities() is unnecessary to make data safe for SQL. It's used when echoing data values to HTML output, to avoid XSS vulnerabilities. That's also an important security issue you need to be mindful of, but it's not related to SQL.

I'm sorry, but this is stupid. Why do you want to apply htmlentities before saving data to the database? What if you want to use the data for something else than just writing it out to a browser?

For example for searching, partitioning data, using the data in other programming languages, etc...

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions