PHP gevorderde |
|
<?php
$query = mysql_query("SELECT ID, Titel, Bericht, Adder, Datum FROM `Nieuws`")
or die (mysql_error());
?>
<table class="news" cellspacing="0" colspan="0">
<?php
while($row = mysql_fetch_assoc($query)) {
echo "<tr><th>";
echo '<div align="center">';
echo '<a href=\"shownews.php?newsid="'.$row['ID'].'"\"> '.$row['Titel'].'';
echo "</div>";
echo "</th></tr>";
echo "<tr><td>";
echo $row['Bericht'];
echo "</td>";
echo '<tr><td align="right">';
echo '<p>Gepost op '.$row['Datum'].' door '.$row['Adder'].'</P>';
echo "</td></tr>";
}
echo "</table>";
?>
<?php $query = mysql_query("SELECT ID, Titel, Bericht, Adder, Datum FROM `Nieuws`") ?> <table class="news" cellspacing="0" colspan="0"> <?php echo '<div align="center">'; echo '<a href=\"shownews.php?newsid="'.$row['ID'].'"\"> '.$row['Titel'].''; echo '<tr><td align="right">'; echo '<p>Gepost op '.$row['Datum'].' door '.$row['Adder'].'</P>'; } ?>
|