Usually you may know or don’t know, in a PhpMyadmin default setting does not support the foreign and regional language. It default supporting language is English. I’m from India, so here most of them using so many languages. So today I’m going to show you that how to insert the foreign and regional language in mysql database using php.
The above image is the snap of what is present in the database. In a usual insert the foreign and other language is does not support. That will be inserted as like ?????????????? (question marks ) or some other thing like not readable. So let see how to solve that. I’m from india, tamilnadu. My mother tongue is tamil so I’m going to insert tamil in database.
HTML META TAG
Html meta tag must in the character set of UTF-8.
SAMPLE DATABASE STRUCTURE
Database name --> 2my4edge
Table name -->comment
Column names --> id, msg, ip_add
and the character set should be UTF-8 format.
while creating database table, you should follow the below step.
and it is a small implementation of insert in database. Previous tutorial ajax insert and view.
In a collation the value taken as latin1_swedish-ci, we have to change that in the format of utf8_general_ci.
While writing insert code we have to add the prefix as N. N is stands for national regional language character set.
While fetching from database we have to add the character set type in php.
and this support most of the languages. Thank you.
RELATED POSTS :