KaWouter
Terugkerende gebruiker
- Lid geworden
- 9 mei 2002
- Berichten
- 1.032
Als ik de volgende code gebruik krijg ik net zoveel scrolbars als dat er "posts" zijn hoe kan ik dat voorkomen?
PHP:
<?
$thread_id = $_GET['thread_id'];
$db = mysql_connect("localhost", "keesie", "sjaak");
mysql_select_db("jaja",$db);
$query = "SELECT * FROM mf_threads ORDER BY thread_timestamp DESC";
$result=mysql_query($query) or die("Error in query:".mysql_error());
while ($row = mysql_fetch_array($result)) {
if ($row["thread_id"] == $thread_id) {
?>
<table width="100%" border="0"><tr>
<td width="57%"><div align="center"><em>Artikel gestart op:</em>
<?
$ts = $row["thread_timestamp"];
$year = substr($ts,0,2);
$month = substr($ts,2,2);
$day = substr($ts,4,2);
$hour = substr($ts,6,2);
$min = substr($ts,8,2);
echo "<em>$day-$month-$year om $hour:$min</em>";
?>
</div></td>
</tr>
</table>
<?
$query2 = "SELECT * FROM mf_artikel ORDER BY artikel_timestamp ASC";
$result2=mysql_query($query2) or die("Error in query:".mysql_error());
while ($row2 = mysql_fetch_array($result2)) {
if ($row2["thread_id"] == $row["thread_id"]) {
?>
<table width="100%" border="0">
<tr>
<td width="28%"><div align="center"><b>Gepost door:</b>
<?
$ts = $row2["artikel_timestamp"];
$year2 = substr($ts,0,2);
$month2 = substr($ts,2,2);
$day2 = substr($ts,4,2);
$hour2 = substr($ts,6,2);
$min2 = substr($ts,8,2);
echo "<b><a href='mailto:";
echo $row2["artikel_email"];
echo "?subject=Mail via Noodels Forum-->'>";
echo $row2["artikel_name"];
echo "</a>";
echo " op: </b>";
echo "$day2-$month2-$year2 om $hour2:$min2";
?>
</div></td>
</tr>
</table>
<div style="height: 500px; overflow: auto;">
<table width="100%" border="0">
<tr>
<td width="61%"><div align="center"><b>Bericht:</b></div></td>
</tr>
<tr>
<td><div align="center">
<?
echo $row2["artikel_text"];
?>
</div>
</td>
</tr>
<tr>
<td> </td>
</tr>
</table>
<hr size="0" />
<?
}
}
}
}
?>