You are here: Re: How to upload form data containing special characters correctly? « PHP Programming Language « IT news, forums, messages
Re: How to upload form data containing special characters correctly?

Posted by Kimmo Laine on 09/04/06 10:18

"Wim Cossement" <wcosseme@nospam.bcol.be> wrote in message
news:edgrbk$n4s$1@snic.vub.ac.be...
> Hello,
>
> I was wondering if there are a few good pages and/or examples on how to
> process form data correctly for putting it in a MySQL DB.
>
> Since I'm not used to using PHP a lot, I already found out that
> addslashes() can be used escape some characters, but I'm having some more
> problems with for instance δ, ε and ΅ (since the text is scientifical)
> Now some people also throw in htmlspecialchars() to convert those to HTML
> entities, but some nest htmlspecialchars() in addslashes() and others do
> the opposite.
>
> Is there a good and error proof way of ensuring that what one puts in a
> textarea gets stored and can be retrieved safe and sound?
>


Use Unicode for everything. Set utf-8 encoding to your database, save the
pages in utf-8, tell the browsers in every possibly imaginable way that you
are providing the content as utf-8. Not exactly easy process, but I
recommend you to try that.

--
"Ohjelmoija on organismi joka muuttaa kofeiinia koodiksi" - lpk
http://outolempi.net/ahdistus/ - Satunnaisesti pδivittyvδ nettisarjis
spam@outolempi.net || Gedoon-S @ IRCnet || rot13(xvzzb@bhgbyrzcv.arg)

 

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

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