1

I have a problem that I can't understand.

Everything om my site is running smoothly, but when using Norwegian special letters the query fails to add a new row in my database. Both documents in Dreamweaver and PHPMyAdmin is set to Latin/ISO-8859-1 so it should in theory work fine. Every character displays fine when manually edit the database via PHPMyadmin. No broken letters or question marks.

My query is pretty standard.

mysqli_query($con,"INSERT INTO customers (w_id, firstname, lastname, email, company, tlf, adress, city, zipcode, country)
     VALUES ('$webshop_info[w_id]', '$firstname', '$lastname', '$email', '$company', '$tlf', '$adress', '$city', '$zipcode', '$country')");

Any ideas, suggestions or workarounds?

4

1 に答える 1

0

問題は charsets のどこかにあります
1. php バージョンが適切ではありません
2. html の char-set メタが設定されていません
3. データベースの照合が間違っています


代わりにユニコードを試してください。

于 2013-09-26T23:30:26.433 に答える