Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End Try out my first PHP web app! Reply To: Try out my first PHP web app!

#180578
__
Participant

So why is my list bad but htmlentities() isn’t?

Nothing’s “bad” about it per se. It’s not implemented, and a programmer might implement it incorrectly (or just partially). htmlentities is tried and tested and maintained (plus it’s native and will run a lot faster).

what is the difference between htmlenteties and MySQLi real escape string?

Conceptually, yes, they have similar purposes: to prevent “data” from being interpreted as “instructions.” But, because one deals with HTML and the other deals with MySQL, they do different things and work in completely different ways.

Read The Friendly Manual for specifics.