You are here: Re: Special Characters into database « PHP Programming Language « IT news, forums, messages
Re: Special Characters into database

Posted by Joγo Morais on 09/28/02 12:01

> I think it is easier to store the text raw in the db, and when
> displaying it in a browser, use htmlentities.

But in this case, should I use iso-8859-1 collation?

Hmm what If I have a site that's visited by users with different
nationalities and they insert text into database with different
language charsets?


> (Of course, make sure you escape the text before inserting to avoid SQL
> injection, eg via mysql_real_escape.)
Thanks for the tip, but my doubt here has nothing to do with
security. :)


> In my opinion that is the cleanest way to store data, and you can also
> use the data for other purposes, eg searching without having to worry
> about changed characters because of the htmlentities.
Thanks for your opinion mate.

 

Navigation:

[Reply to this message]


УдалСнная Ρ€Π°Π±ΠΎΡ‚Π° для программистов  •  Как Π·Π°Ρ€Π°Π±ΠΎΡ‚Π°Ρ‚ΡŒ Π½Π° Google AdSense  •  England, UK  •  ΡΡ‚Π°Ρ‚ΡŒΠΈ Π½Π° английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Π‘Π°ΠΉΡ‚ ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ Π² Π‘Ρ‚ΡƒΠ΄ΠΈΠΈ Π’Π°Π»Π΅Π½Ρ‚ΠΈΠ½Π° ΠŸΠ΅Ρ‚Ρ€ΡƒΡ‡Π΅ΠΊΠ°
ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ΠΈΠ΅ ΠΈ ΠΏΠΎΠ΄Π΄Π΅Ρ€ΠΆΠΊΠ° Π²Π΅Π±-сайтов, Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚ΠΊΠ° ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΠ½ΠΎΠ³ΠΎ обСспСчСния, поисковая оптимизация