writing foreign language chars from php5 to db (mysql4)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Does anybody knows how to insert a foreign lang. char into php5 to mysql4?

languages, ex:
- japanese (jis)
- german (de)

I now know, how to display it properly on a website using meta tags.

ex:
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">

And catching it over a php5 form.

But, when i insert it to a db. Everything's messed up.

// code
$languagechar = $_GET["languagechar"];

$insert = "
INSERT INTO languages
(`char`)
values
('$languagechar')
";


$add_member = $dbData->query($insert);

if (DB::isError($add_member)) {
die($add_member->getMessage());
}
// code

Do i need to convert it to something? Im testing it my phpmyadmin, and 
phpmyadmin can insert it with the correct values and characters. How come on 
my code it does not.


-- 
Louie Miranda
http://www.axishift.com -- under development

[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux