Jump to content

[SOLVED] Table Problem


mike12255

Recommended Posts

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>";
?> 

Link to comment
https://forums.phpfreaks.com/topic/145857-solved-table-problem/
Share on other sites

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>";
?>

Link to comment
https://forums.phpfreaks.com/topic/145857-solved-table-problem/#findComment-765847
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.