mike12255 Posted February 19, 2009 Share Posted February 19, 2009 I am trying to make is so that part of a post appears unders its respective topic tittle as can be seen on ( http://schoolworkanswers.com/math.php <-- also my error) problem is im not the best with tables and thats the reason its messing up i was wondering if anyone else knew how to fix this problem. Heres my code: <?php $getthreads="SELECT * from forumtutorial_posts where parentid='0' AND `area`= 'math' order by lastrepliedto DESC"; mysql_real_escape_string('parentid'); mysql_real_escape_string('area'); $getthreads2=mysql_query($getthreads) or die("Could not get threads"); while($getthreads3=mysql_fetch_array($getthreads2)) { $getthreads3[title]=strip_tags($getthreads3[title]); $getthreads3[author]=strip_tags($getthreads3[author]); $name = strip_tags($getthreads3[post]); if (strlen($name) > 20){ while (strlen($name) >20){ $name = substr($name,0,-1); } } print "<tr class='mainrow'><td><A href='message.php?page=1&id=$getthreads3[postid]&catagory=$area'>$getthreads3[title]</a></td><td>$getthreads3[author]</td><td>$getthreads3[numreplies]</td><td> <b>$getthreads3[lastposter]</b></td>"; print "<br>"; print "$name</tr>"; } print "</table>"; ?> Quote Link to comment Share on other sites More sharing options...
sasa Posted February 19, 2009 Share Posted February 19, 2009 try ... print "<tr class='mainrow'><td><A href='message.php?page=1&id=$getthreads3[postid]&catagory=$area'>$getthreads3[title]<br />$name</a></td><td>$getthreads3[author]</td><td>$getthreads3[numreplies]</td><td> <b>$getthreads3[lastposter]</b></td>"; print "</tr>"; } print "</table>"; ?> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.