show images from database ..
Posted: Mon Apr 21, 2008 11:24 am
hello every one ,
i'm editing this module and i know a little pet about php and phpmyadmin ..
this module for importing top 10 news (articles ) from the news section and sort them by most reading ..
so .. this is the code before my editing ..
so .. all what i need to know is how to add the show or display the article image from the database
i did this
but it's display a number like ( 0 ) or (1 ) in the html file..
what can i do ?
i'm editing this module and i know a little pet about php and phpmyadmin ..
this module for importing top 10 news (articles ) from the news section and sort them by most reading ..
so .. this is the code before my editing ..
Code: Select all
<?php
/***************************************************************************
ÈÑãÌÉ ÚÈÞÑí ÇáÚÑÈ || ãæÞÚ ÎÏãÇÊí.ßæã
http://www.khadmaty.com (webmaster@khadmaty.com)
***************************************************************************/
// ßæÏ ÇÏÑÇÌ ÇáÈáæß Ýí ÇáÈæÇÈÉ ÇáÚÑÈíÉ
// <!--INC dir="block" file="most_seen_news.php" -->
if (TURN_BLOCK_ON !== true){
die ("<center><h3>ÍÕá ÎØÃ ÚäÏ ãÍÇæáÉ ÇÓÊÏÚÇÁ ÇáÇÎÈÇÑ ÇßËÑ ãÔÇåÏÉ Ýí ÇáÈæÇÈÉ ÇáÚÑÈíÉ</h3></center>");
}
$index_middle .= "<div align=\"center\">
<center><table border='0' width='100%' align='center' cellpadding='".$linkColcount."'><tr>";
$result = mysql_query("SELECT id,title,reader FROM rafia_news where allow='yes' ORDER BY reader DESC limit 10");
while($row = mysql_fetch_array($result)){
extract($row);
$index_middle .= "<div><a title='read $reader' times before href=news.php?action=view&id=$id><b>$title</b></a></div></a>";
}
$index_middle .= "</tr></table></div>";
echo $index_middle;
?>i did this
Code: Select all
<?php
// <!--INC dir="block" file="most_seen_news.php" -->
if (TURN_BLOCK_ON !== true){
die ("<center><h3>ÍÕá ÎØÃ ÚäÏ ãÍÇæáÉ ÇÓÊÏÚÇÁ ÇáÇÎÈÇÑ ÇßËÑ ãÔÇåÏÉ Ýí ÇáÈæÇÈÉ ÇáÚÑÈíÉ</h3></center>");
}
$index_middle .= "<div align=\"center\">
<center><table border='0' width='100%' align='center' cellpadding='".$linkColcount."'><tr>";
$result = mysql_query("SELECT id,title,reader,catmig FROM rafia_news where allow='yes' ORDER BY reader DESC limit 10");
while($row = mysql_fetch_array($result)){
extract($row);
$index_middle .= "<div><a title='ÚÏÏ ãÑÇÊ ÇáÞÑÇÁå $reader' href=news.php?action=view&id=$id><b>$title</b></a></div><div>$catmig</div></a>";
}
$index_middle .= "</tr></table></div>";
echo $index_middle;
?>what can i do ?