Ich bin gerade dabei, einen Stundenplan zu programmieren.
Ich habe es geschafft, die erste Spalte meiner Tabelle ( Montag ) korrekt zu füllen.
jedoch weiß ich nun nicht, wie ich es bewerkstelligen soll, dass die zweite Tabelle befüllt wird, sobald im Datensatz das Attribut "Tag" den Wert "Dienstag" hat.
Hab schon einiges versucht, jedoch nichts bewirkt.
Ich bitte um/bedanke mich für Hilfe
Code:
<!DOCTYPE html>
<html>
<head>
<title>Titel</title>
<link href="style.css" type="text/css" rel="stylesheet">
</head>
<body>
<div id="wrapper">
<div id="Kopf">
<h1>Stundenplan</h1>
</div>
<div id="Inhalt">
<div class="Stundenplan">
<?php
include "connect.php";
$SelKlasse = "HBF IAS13";
$result = mysql_query("SELECT `Fach`,`L1`,`Tag` FROM `tbl_stunden`
WHERE `Klasse` = '".$SelKlasse."' AND NOT `Fachrichtung` = 'SI'
ORDER BY `Tag` DESC, `Std-Pos` ASC ");
echo"
<table class='table1'>
<tr>
<th>Montag</th>
<th>Dienstag</th>
<th>Mittwoch</th>
<th>Donnerstag</th>
<th>Freitag</th>
</tr>
";
//Schleife
while($row = mysql_fetch_array($result))
{
echo "<tr>";
if($row['Tag'] == 'Montag')
{
echo "<td>" . $row['Fach'] . "<br>" . $row['L1'] . "</td>";
}
echo "</tr>";
}
echo "</table>";
//echo"
//</tr>
//</table>
//";
?>
<br>
</div>
</div>
<div id="Fuss">
</div>
</div>
</body>
</html>






gehört? Ist ziemlich einfach, könnte so aussehen bei dir:
