Şunu Kullan:

session_start();
ob_start();

$db_host = "localhost";
$db_username = "root";
$db_password = "";
$db_name = "q3a";

$db_connect = mysql_connect($db_host,$db_username,$db_password) or die ("Veritabanına baglanmadı");
$db_select = mysql_select_db($db_name,$db_connect) or die ("Veritabanı seçilemedi");

$db_query1 = mysql_query("SET CHARACTER SET UTF-8");
$db_query2 = mysql_query("SET NAMES UTF-8");
?>