Please friends I want any one to make this clear for me so I can do what ever I want.
I have a database named "news" and it's consist of 3 columns, "picture", "title", "content"; do it too sample.
I want to show the latest 10 news at the top of my CMPS index scrolling upward, what I did is the following:
I add a php file to the modules folder and I name it news.php
PHP Code:
require_once('./global.php');
$sql = mysql_query("select * From news WHERE news.isdisplay!=0 ORDER BY newsid DESC LIMIT 10");
while ($news = @mysql_fetch_array($sql))
{
$news_pic = ($news['picture']);
$news_title = ($news['title']);
$news_content = ($news['content']);
}
eval('$home[$mods[\'modid\']][\'content\'] = "' . fetch_template('adv_portal_news') . '";');
after that i add a new module:
Module Title : news
File to Include : news.php
Templates Used : adv_portal_news
Clean File Output : no
Use Module Shell Template : yes
After that i added new Template and I put inside it:
$news_title
Just to check if there is output or no !!
And I got nothing !!????
Please friends help me?
REGARDS