how to insert special characters into a database(MySQL) like
Registered symbol ( ® )
OR
Copyright sign ( © )
OR
Trade Mark sign ( ™ )<
From the PHP docs for htmlentities()
:
This function is identical to htmlspecialchars() in all ways, except with htmlentities(), all characters which have HTML character entity equivalents are translated into these entities.
Don't worry about encoding things when you store them: store the data raw, and then encode it with htmlentities()
when you display it in your HTML.
Edit: Also, read this.