January 2, 201115 yr Hello, Is htmlentities just to display data? Example, Lets say i have a query fetching a comment while($row = blah blah..) { echo htmlentities($row['comment'], ENT_QUOTES, 'UTF-8'); } Or should I use it before the data enteres the database?
January 2, 201115 yr I prefer and believe its good practice to store sanitized/formatted data in the database. It will reduce server load as well, only having to perform the function on update rather than every time its requested.
January 2, 201115 yr Author I prefer and believe its good practice to store sanitized/formatted data in the database. It will reduce server load as well, only having to perform the function on update rather than every time its requested. Thats what i thought, Thanks mate.
Create an account or sign in to comment