You are here: Re: form text é->éé in MySQL « PHP Language « IT news, forums, messages
Re: form text é->éé in MySQL

Posted by Pirkka Liukkonen on 04/05/07 14:11

Hi!

The character looks to be Unicode coded. You have two main options:
a) you change the web page content coding to something else than UTF-8 ,
for example iso-8859-1 (assuming your database is ISO-LATIN-1 database)
or
b) you change your database to be unicode database (UTF-8 coded) and
keep the WWW page character set in UTF-8

You can also make Unicode -> Latin-1 conversion using mb_strings-functions.

Pirkka

NRJ wrote:
> Hi,
>
> I've got a form with textbox (Description) in it. Whenever I want to
> insert a word with the character é it will result as éé in my MySQL
> table when I look in the phpadmin.
>
> The code is like:
> $Description = $_REQUEST["Description"];
>
> $result = mysql_query("Insert into Sites (SiteDescription) Values
> ('" . $Description . "') ",$link);
> if (!$result) {
> echo "no results" ;
> } else {
> echo $result . "Added<br><br>";
> }
>
>
> Please advice...
>
> Thanks
> Niels
>

 

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

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация