Skip to content

Instantly share code, notes, and snippets.

@mahbub-shohag
Created May 1, 2017 14:10
Show Gist options
  • Save mahbub-shohag/15f3733903a9727f81817ec2d5bdf800 to your computer and use it in GitHub Desktop.
Save mahbub-shohag/15f3733903a9727f81817ec2d5bdf800 to your computer and use it in GitHub Desktop.
You must add these two lines just after selecting the database, i.e mysql_select_db() function.
mysql_query(‘SET CHARACTER SET utf8’);
mysql_query(“SET SESSION collation_connection =’utf8_general_ci'”);
After executing these two statements MySQL will handle the rest.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment