0

Hi everyone I know that this subject has been posted many times but none of them work for me . So I need to store some arabic data in particular table but when I send it and explore it within phpmyadmin I found something like this &#1575 i try to add the meta charset=utf-8 in head and add accept-charset='utf-8' in the form but still no difference here's the code that i use it to connect to my database

$conect=new PDO("mysql:host=$host;dbname=$datab;charset=utf8;connection collation: utf8_general_ci",$user,$pass);
$conect->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$sql="INSERT INTO botola_team(name,nameabbreviation,team_url,year_of_ta2sis,President,coach,name_field,pic_of_team,logo,pic_field)
VALUES ('$name','$nameabrev','$teamurl','$ta2sis','$president','$coach','$namefield','$teampic','$logo','$teampic')";
$conect->exec($sql);
Table structure
Marc Delisle
  • 8,879
  • 3
  • 29
  • 29
jest.bou
  • 27
  • 8

1 Answers1

0

Solution is to use utf8_general_ci instead of utf8_unicode_ci charset in table column.

hywak
  • 890
  • 1
  • 14
  • 27