Answers for "mysql store hindi characters"

PHP
1

how to insert hindi text in mysql database

<?php
/*
  first of all open database structure and change  
  table Collation  to (utf8_general_cithen) save the changes

  You need to just add few queries when you establish database connection so 
  that your database support for utf8 Unicode characters.
  
  Add the below lines to your database Config FIle
*/

mysqli_query($con,"SET character_set_results = 'utf8', character_set_client = 'utf8', character_set_connection = 'utf8', character_set_database = 'utf8', character_set_server = 'utf8'");
mysqli_set_charset($con,'utf8');
?>
Posted by: Guest on February-02-2021

Browse Popular Code Answers by Language