insanemonkey
10-01-2007, 03:57 AM
Ok I added a script to my site on the mainpage..
it show the last 5 posted messages on my forum..
but the thing is, it only works on the index page and won't show on anyother pages.. ill post code below..
<?php
include "connect.php";
$blog_postnumber = 5;
if(!isset($_GET['page'])) { $page = 1;}else { $page = (int)$_GET['page'];}$from = (($page * $blog_postnumber) - $blog_postnumber);
$getthreads="SELECT * from forum where parentid='0' order by lastrepliedto desc LIMIT $from, $blog_postnumber";
$getthreads2=mysql_query($getthreads) or die("Could not get threads");while($getthreads3=mysql_fetch_array($getthreads2)){ $getthreads3[title]=strip_tags($getthreads3[title]);
print "<ul>
<li><A href='forums/forums/message.php?id=$getthreads3[postid]'>$getthreads3[title]</a><BR></ul>";
}
?>
thats my code... and for an example..
goto http://www.xudas.com
and goto the about page or contact us page. it doesn't show up anything???
PLZ HELP THNX!!!
it show the last 5 posted messages on my forum..
but the thing is, it only works on the index page and won't show on anyother pages.. ill post code below..
<?php
include "connect.php";
$blog_postnumber = 5;
if(!isset($_GET['page'])) { $page = 1;}else { $page = (int)$_GET['page'];}$from = (($page * $blog_postnumber) - $blog_postnumber);
$getthreads="SELECT * from forum where parentid='0' order by lastrepliedto desc LIMIT $from, $blog_postnumber";
$getthreads2=mysql_query($getthreads) or die("Could not get threads");while($getthreads3=mysql_fetch_array($getthreads2)){ $getthreads3[title]=strip_tags($getthreads3[title]);
print "<ul>
<li><A href='forums/forums/message.php?id=$getthreads3[postid]'>$getthreads3[title]</a><BR></ul>";
}
?>
thats my code... and for an example..
goto http://www.xudas.com
and goto the about page or contact us page. it doesn't show up anything???
PLZ HELP THNX!!!