wenn du Tippfaul bist, mach dir ne Klasse
gruss
gruss
<?php
include_once("../inc/db_data.inc.php");
include_once("../inc/function.inc.php");
//include_once("../inc/db.inc.php");
function cat() {
global $cat;
$cat = mysql_query ("SELECT * FROM forum_categorie ORDER BY cat_auth");
return $cat;
}
?>
<html>
<head>
<meta http-equiv="Content-Language" content="de">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="PFE 32">
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<title>Forum by Webdesign - CCT</title>
</head>
<body>
<table width="100%" border="0">
<tr>
<td>
<?php
include("header/header_home.php");
?>
</td>
</tr>
</table>
<table width="100%" border="1"cellpadding="0" cellspacing="0">
<tr>
<td width="5%" bgcolor="#DFDFDA"> </td>
<td width="65%" bgcolor="#DFDFDA"><font face="Comic Sans MS" size="2">Forum</font></td>
<td width="5%" bgcolor="#DFDFDA"><center><font face="Comic Sans MS" size="1">Beiträge</font></center></td>
<td width="5%" bgcolor="#DFDFDA"><center><font face="Comic Sans MS" size="1">Themen</font></center></td>
<td width="10%" bgcolor="#DFDFDA"><center><font face="Comic Sans MS" size="1">Letzer Beitrag</font></center></td>
<td width="10%" bgcolor="#DFDFDA"><center><font face="Comic Sans MS" size="1">Moderator</font></center></td>
</tr>
<?php
cat();
// $cat = mysql_query ("SELECT * FROM forum_categorie ORDER BY cat_auth");
while($cat_row = mysql_fetch_array($cat))// Zile 40
{
?>
<tr>
<td colspan="6">
<table width="100%" border="0" bgcolor="#DFDFDF">
<tr>
<td><font face="Comic Sans MS" size="2"><?php echo"$cat_row[cat_name]";?></font></td>
</tr>
</table>
</td>
</tr>
<?php
$forum = mysql_query ("SELECT * FROM forum WHERE forum_cat='$cat_row[id]'");
while($forum_row = mysql_fetch_array($forum))
{
?>
<tr>
<td width"5%" bgcolor="#DFDFDF"> </td>
<td width"65%"><font face="Comic Sans MS" size="2"><?php echo"$forum_row[forum_name]";?><br></font><font face="Comic Sans MS" size="1"><?php echo"$forum_row[forum_title]";?></font></td>
<td width="5%"><font face="Comic Sans MS" size="1">Anzahl</font></td>
<td width="5%"><font face="Comic Sans MS" size="1">Anzahl</font></td>
<td width="10%"><font face="Comic Sans MS" size="1">Letzer Beitrag</font></td>
<td width="10%"><font face="Comic Sans MS" size="1">Moderator</font></td>
</tr>
<?php
}
}
?>
</table>
</body>
</html>
function cat() {
global $cat; // Des is wichtig, but please dont't ask me why
$cat = mysql_query ("SELECT * FROM forum_categorie ORDER BY cat_auth");
// return $cat; // Kannst Du Dir auch sparen,, but please dont't ask me why
}
function cat()
{
global $cat;
$cat = mysql_query ("SELECT * FROM forum_categorie ORDER BY cat_auth");
}
function forum()
{
global $forum;
$forum = mysql_query ("SELECT * FROM forum WHERE forum_cat='$cat_row[id]'");
}
<?php
// Hauptkategorien auslesen
function cat()
{
global $cat;
$cat = mysql_query ("SELECT * FROM forum_categorie ORDER BY cat_auth");
}
// Foren auslesen
function forum($wert)
{
global $forum;
$forum = mysql_query ("SELECT * FROM forum WHERE forum_cat='$wert'");
}
?>
forum($cat_row[id]);
Kommentar