PHP interesse |
|
Ik heb de volgende PHP code:
if($p == 'topic') {
$fid = $_GET['fid'];
$cid = $_GET['cid'];
$tid = $_GET['tid'];
if(!is_numeric($fid) || !is_numeric($cid) || !is_numeric($tid)) {
echo 'Het id moet een nummer zijn';
}else{
$qtopic = mysql_query("SELECT * FROM forum_topics WHERE forum_id = ".$fid." AND cat_id = ".$cid." AND id = ".$tid) OR DIE("Er is een fout opgetreden:<br /><br /><font color='red'> ".mysql_error()."</font>");
$topic = mysql_fetch_array($qtopic);
$quser = mysql_query("SELECT * FROM users WHERE id= ".$topic['user_id']) OR DIE("Er is een fout opgetreden:<br /><br /><font color='red'> ".mysql_error()."</font>");
$user = mysql_fetch_array($quser);
echo '<table style="border-size: 1px; border-color: #FFFFFF; width: 100%;">';
echo '<tr>';
echo '<td style="color: #0379B7; background: #8E0000;" colspan="2">
Onderwerp: <b>'.$topic["title"].'</b>
<br />
Door: <b><a href="users.php?up=profile&userid='.$topic["user_id"].'" class="sidebara">'.$user["name"].'</a></b><br />
Op: <b>'.$topic["addtime"].'</b><br />
</td>';
echo '</tr>';
echo '<tr>';
echo '<td width="30%" bgcolor="#0379B7" style="color: #8E0000;">Offline<br />
<br />
<img src="'.$user["avatar"].'" width="80" height="80" />
<br />
'.$user["status"].'
<br />
</td>
<td width="70%" bgcolor="#0379B7" style="color: #8E0000;">
'.nl2br($topic["topic"]).'<br /><br /></td></tr></table>';
}
}
if($p == 'topic') { $fid = $_GET['fid']; $cid = $_GET['cid']; $tid = $_GET['tid']; echo 'Het id moet een nummer zijn'; }else{ $qtopic = mysql_query("SELECT * FROM forum_topics WHERE forum_id = ".$fid." AND cat_id = ".$cid." AND id = ".$tid) OR DIE("Er is een fout opgetreden:<br /><br /><font color='red'> ".mysql_error()."</font>"); $quser = mysql_query("SELECT * FROM users WHERE id= ".$topic['user_id']) OR DIE("Er is een fout opgetreden:<br /><br /><font color='red'> ".mysql_error()."</font>"); echo '<table style="border-size: 1px; border-color: #FFFFFF; width: 100%;">'; echo '<td style="color: #0379B7; background: #8E0000;" colspan="2"> Onderwerp: <b>'.$topic["title"].'</b> <br /> Door: <b><a href="users.php?up=profile&userid='.$topic["user_id"].'" class="sidebara">'.$user["name"].'</a></b><br /> Op: <b>'.$topic["addtime"].'</b><br /> </td>'; echo '<td width="30%" bgcolor="#0379B7" style="color: #8E0000;">Offline<br /> <br /> <img src="'.$user["avatar"].'" width="80" height="80" /> <br /> '.$user["status"].' <br /> </td> <td width="70%" bgcolor="#0379B7" style="color: #8E0000;"> '.nl2br($topic["topic"]).'<br /><br /></td></tr></table>'; } }
nu moet $topic["topic"] bovenaan de td staan. alleen de tekst staat nu in het midden van boven en beneden... Mijn vraag is: hoe kan ik de tekst bovenaan de td laten staan?
|