title: php mysql insert into utf-8
body: <p>I'm going to insert into some articles in mysql using PHP. </p>
  
  <p>This is phpMyAdmin information:</p>
  
  <pre><code>Server: localhost via TCP/IP
  Server version: 5.0.85-community-nt
  Protocol version: 10
  User: root@localhost
  MySQL charset: UTF-8 Unicode (utf8) 
  </code></pre>
  
  <p>Here is my table information:</p>
  
  <pre><code>Table   Action  Records 1  Type  Collation  Size  Overhead  
  article       10 InnoDB utf8_unicode_ci 16.0 KiB - 
  1 table(s)  Sum 10 InnoDB utf8_unicode_ci 16.0 KiB 0 B
  </code></pre>
  
  <p>I add </p>
  
  <pre><code>&lt;?php header('Content-type:text/html; charset=utf-8'); ?&gt; 
  </code></pre>
  
  <p>in the top  of my php code, add <code>mysql_query("set names 'utf-8'");</code> before <code>mysql_select_db("data",$db1);</code></p>
  
  <p>but the data in the mysql is still like</p>
  
  <pre><code>piÃ¹ freddi
  </code></pre>
  
  <p>How do I show the data correctly?</p>