1. Server side:
Your table columns have to be set to utf (utf8_general_ci). This is very important (it is best to set utf8 for all databases as DEFAULT, so when you create any table and columns they are utf8). Not only database or table must be set to utf8, but the columns has to be set to utf8. If you have already any data in database, try to convert them by any encoding convertor, but usually all must be replaced when you change column's encoding from latin1 to utf, where data were tried to be saved as utf.
2. Client side:
In php you have to run a simple query after a connection to mysql, so server knows what encoding you accept the data in:
mysql_query("SET NAMES 'utf8'");
It is because php's mysql_connect sets the connection encoding to 'latin1'
3. Output:
Page has to conatin HTTP header stating that it is utf-8 encoded. So there are two ways
One is to add meta tag into header of html:
Or you can send the header by php:
header( 'Content-Type: text/html; charset=utf-8' );
(this has to be run before any output is sent, so put it at the very beginning of your php file, just after
Or you might try to call ob_start() at the beginning of your php file, then you can have headers anywhere in your code, because the output is buffered until it reaches the end of php script, or until you say to flush the buffer, and buffer also takes care of headers and flushes them before normal output)