MyBB Community Forums

Full Version: How can I use echo ?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I need a little help, please.
I want to make a new page to display just contents of posts form a certain forum.

This is query
SELECT `message` FROM `mybb_posts` WHERE fid=3 and tid=3
and I try to display just messagerow, but I don't know how can I do this.
Sad


Here is contents of my test page (forum/test.php) where $fid = thread id and $tid = subject id, but I receive a blank page. Sad
<?php

    $fid = 3;
    $tid = 3;
    $limit = 5;
    $forumpath = 'forum/';

    chdir($forumpath);
    define("IN_MYBB", 1);
    require('./global.php');
    require_once MYBB_ROOT."inc/class_parser.php";
    chdir('../');
    
    $query = $db->simple_select(TABLE_PREFIX.'posts', 'message', "fid={$fid} and tid={$tid} ORDER BY tid DESC LIMIT {$limit}");
	$row = $db->fetch_array($query);
	$message = $parser->parse_message($row['message']);
    echo("{$message}<br />");

?>

Can you help me please !?
Rolleyes

p.s.: I'm novice... but I want to learn how can I do this Toungue
Thanks.
Echo is used this way: echo "whatever you want";
Yeah... Smile I know... anyway... I found where is my mistake...


Thank's for reply.