By mdotcomegypt on
i created a new page that select the title of nodes under a category with id cid=7 from my database but i v some encoding plm
you can see it at this link
http://www.elnasllnas.com/site/article2.php
the code of the page is :
Untitled Document
<?
include('connectDB.php');
$result =mysql_query("SELECT * FROM `category_node` WHERE cid=7 ");
while($row = mysql_fetch_array($result))
{
$hosam=$row[nid];
$results =mysql_query("SELECT title FROM node WHERE nid=$hosam");
while($rows= mysql_fetch_array($results))
{
echo $rows[title]."";
}
}
?>
Note :
my database is utf8
Comments
What does this have to do we Drupal?
From your posting this does not look like it is related to Drupal at all.
(no title)
I have no idea what you already have in the included connectDB.php, but try setting your database connection to utf-8 first. with a
.
Additionally you can try
.
(assuming that your Drupal tables have the correct encoding.)
cog.rusty
Thancks cog.rusty you are the the best !!!!!
your solution fixed one of the biggest Plm i faced