sir
i created a database with following table in MySQL.
i want to store unicode data in my table. when i insert unicode data into my table it worked correctly. but my proble is that when i write code in php to display the contents of table i get only question marks in the place of unicode data. why this happens... my code is below... please go through it and help me....Code:Field Type Collation Name Varchar(50) utf8_bin Age int(11)
PHP Code:<?php
mysql_connect("localhost","root","");
mysql_select_db("mydata1");
$result=mysql_query("SELECT * FROM mytable");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<HEAD>
<TITLE>
Testing
</TITLE>
<meta http-equiv="content-type" content="text/html:charset=utf-8"/>
</HEAD>
<BODY>
<TABLE border="1" cellpadding="2">
<TR>
<TH> NAME</TH>
<TH>AGE</TH>
</TR>
<?php
while ($row=mysql_fetch_array($result)) {
echo "<tr>";
echo "<td>" . $row['Name'] . "</td>";
echo "<td>" . $row['Age'] . "</td>";
echo "</tr>";
}
mysql_free_result($result);
mysql_close();
?>
</TABLE>
</BODY>
</HTML>




Reply With Quote