I have the following code:
Code: Select all
<?php
include_once("inc_sql.php");
$connect = mysql_connect(HOSTNAME, USERNAME, PASSWORD);
mysql_select_db(DATABASE, $connect);
$username = $_GET[username];
$result = mysql_query("select title, status, dateorder from Jobs");
while($row=mysql_fetch_array($result)){
$line = 'row title="'.$row[title].'" status="'.$row[status].'" dateorder="'.$row[dateorder].'"/';
echo $line;
}
mysql_close( $connect );
?>but there is ONE MAJOR FAULT: it doesnt fetch greek characters correctly.
(the table and fields have UTF-8 encoding).
the result is:
Code: Select all
row title="Dokimastiko ena" status="kenostatus" dateorder="2008-02-01"/row title="??????? ??? CRF" status="test" dateorder="2008-02-08"/so the correct reply from php should be
Code: Select all
row title="Dokimastiko ena" status="kenostatus" dateorder="2008-02-01"/row title="??????? ??? CRF" status="test" dateorder="2008-02-08"/does anyone know or have a hint where exactly the problem is? i have tried utf8_encode but nothing happened.
any idea would be much appreciated as i am a php-newbie
THANK YOU ALL
minas
athens, greece
http://plus.ma