shoutbox help
Posted: Sun Feb 01, 2004 5:56 am
Hello guys im new here i'm having a strange problem with my shoutbox i created i can't get the information to loop with my emoticons when i take the code away for the emoticans it works fine as soon as i add it it only shows one entry thanks for you help
Heres the code i have now.
the addsmile function is in a function.php page and got the code from one of the posts here to try to fix it but didn't work.
Thanks
Viper
Heres the code i have now.
Code: Select all
$smilie_dir = 'templates/bev/images/';
$sql = "SELECT * FROM ".$prefix."_shout";
$result = $db->query($sql);
$text = "";
while($shout = $db->fetch($result)) {
$shout_name = $shout['name'];
$shout_email = $shout['email'];
$shout_www = $shout['www'];
$shout = $shout['shout'];
if($shout_www == "") {
$www = "";
} else {
$www = "(<a href="$shout_www" target="_blank">www</a>)";
}
if($shout_email == "") {
$shout_email = $shout_name;
} else {
$shout_email = "<a href="mailto:$shout_email">$shout_name</a>";
}
$text .= "$shout_email<font class="text">:</font>$www<br>" . addsmile($shout) . "<br><hr>";
}
echo $text;Thanks
Viper