Wo liegt hier der Fehler ????
PHP:
<html>
<head>
<title>Forum</title>
</head>
<body bgcolor="#ffffff" text="#000000" link="#001571" vlink="#5566ae">
<?
if ($show=="") {$show="suchen";}
if ($show=="suchen") {
?>
<form action="<? echo $PHP_SELF."?show=ergebnisse&username=$username" ?>" method="post">
<input type="text" name="suche" size="30"> <input type="submit" value="Suchen">
</form>
<?
} elseif ($show=="ergebnisse") {
?>
<table cellpadding="0" cellspacing="0" border="0" width="850" align="center">
<tr>
<td width="500"><img src="img/logo.gif" width="270" height="60" border="0"></td>
</tr>
</table>
<br>
<table cellpadding="0" cellspacing="1" border="0" width="900" align="center">
<tr>
<td colspan="3" height="30"><a href="search.php?username=<? echo $username ?>"><font face="Arial" size="2">Zurück</font></a></td>
</tr>
<tr>
<td width="30" bgcolor="#f0f0f9"> </td>
<td width="510" bgcolor="#f0f0f9"><font face="Arial" size="2">Thema</font></td>
<td width="60" bgcolor="#f0f0f9" align="center"><font face="Arial" size="2">Antworten</font></td>
<td width="150" bgcolor="#f0f0f9" align="center"><font face="Arial" size="2">Autor</font></td>
<td width="150" bgcolor="#f0f0f9" align="center"><font face="Arial" size="2">Letzter Beitrag</font></td>
</tr>
<?
$conn_id=mysql_connect($host,$user,$pwd);
mysql_select_db($database,$conn_id);
$query="select * from $table_posts where inhalt like '% $suche %' order by id desc";
$result=mysql_query($query,$conn_id);
while ($row=mysql_fetch_array($result))
{$themaid1=$row['themaid'];
$query4="select * from $table_themen where id = $themaid1 order by id desc";}
$result4=mysql_query($query4,$conn_id);
while ($row4=mysql_fetch_array($result4))
{$thematitel=$row4['titel'];
$themaid=$row4['id'];
$themaautor=$row4['autor'];
echo "<tr>
<td width=\"30\" bgcolor=\"#f0f0f9\" align=\"center\"><img src=\"img/folder.gif\" border=\"0\"></td>
<td width=\"510\" bgcolor=\"#ffffff\"><a href=\"viewtopic.php?forum=$forum&thema=$themaid&username=$username\"><font face=\"Arial\" size=\"3\">".$thematitel."</font></a></td>
<td width=\"60\" bgcolor=\"#f0f0f9\" align=\"center\"><font face=\"Arial\" size=\"2\">";
$query2="select * from $table_posts where forumid = $forum and themaid = $themaid";
$result2=mysql_query($query2,$conn_id);
$antworten=mysql_numrows($result2);
$antw=$antworten-1;
echo "$antw</font></td>
<td width=\"150\" bgcolor=\"#ffffff\" align=\"center\"><font face=\"Arial\" size=\"2\">".$themaautor."</font></td>
<td width=\"150\" bgcolor=\"#f0f0f9\" align=\"center\"><font face=\"Arial\" size=\"1\">";
$query3="select * from $table_posts where themaid = $themaid and forumid = $forum order by zeit desc";
$result3=mysql_query($query3,$conn_id);
$row2=mysql_fetch_array($result3);
$poster=$row2['autor'];
$zeit=$row2['zeit'];
echo "$zeit<br>$poster</font></td>
</tr>
";}
?>
<tr>
<td width="30" bgcolor="#f0f0f9"> </td>
<td width="510" bgcolor="#f0f0f9"> </td>
<td width="60" bgcolor="#f0f0f9"> </td>
<td width="150" bgcolor="#f0f0f9"> </td>
<td width="150" bgcolor="#f0f0f9"> </td>
</tr>
</table>
<? } ?>
</body>
</html>