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
<body>
<?php
$con=mysql_connect(“localhost”,”root”);
if(!$con)
die(‘could not connect:’. mysql_error());
mysql_select_db(‘bangla’,$con);
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]‘)”;
if(mysql_query($sql,$con))
echo “One row created”;
else
echo “Error creating row”.mysql_error();
mysql_close($con);
include “shamim.php”;
?>
</body>
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
Hello Samim Ahmed
You have done a great job. I think you will be successful to gain your final achievement. Congratulation
Regards
Saidur Rahman
http://ranawd.wordpress.com/
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