How to Insert bangla in php Mysql database.

if you know how to insert data in English language to mysql database, then It is very easy for you to insert bangla in phpmysql batabase , just you must have write two line extra code in php. for example

die(‘could not connect:’. mysql_error());

mysql_query(‘SET CHARACTER SET utf8’,$con);                                                     //Extra for Bangla
mysql_query(“SET SESSION collation_connection=’utf8_general_ci'”,$con) ;       // Extra for Bangla

$sql=”INSERT INTO info1 VALUES (‘$_POST[roll]’,’$_POST[name]’,’$_POST[dept]’)”;
echo “One row created”;
echo “Error creating row”.mysql_error();
include “shamim.php”;


I have marked two extra line code using Italic which is needed for bangla input. I hope if you follow this instruction then it will be very easy for you.

N.B: first you need to installed AVRO Unicode and Avro keyboard

  1. Hello Samim Ahmed
    You have done a great job. I think you will be successful to gain your final achievement. Congratulation

    Saidur Rahman

  2. Nice post.. But better solution may be use of MySQL collation in Bangla.
    MySQL server should now have two new collation rules for Bangla:

    1. utf8_bangla_ci : follows the original order
    2. utf8_bangla_dictionary_ci : follows the Bangla Academy dictionary order

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: