Hallo,
Ik heb een forum.
en als ik er informatie uithaal dan word het niet in regels verdeeld maar word alles aanelkaar geplakt.
Weet iemand hoe dit komt ?
script:
<?php
session_start();
?>
<link href="/paginas/css/lettertypen.css" rel="stylesheet" type="text/css" />
<?php
error_reporting(E_ALL);
if ($_SESSION['user_ID'] == "")
{
print("<div align=\"center\"><span class=\"xbig\">Je bent niet ingelogd!</span><br /> <br /><span class=\"style4\"><a href=\"/paginas/login.php\">Hier</a> kun je je inloggen</span></div>");
exit;
}
//Informatie uit GET halen.
$topic_id = $_GET['topic_id'];
//verbinding maken met da database!
$dbc = mysql_connect('localhost', '****', '******´);
mysql_select_db('knorfski', $dbc);
//Query's aanmaken
$query1 = "select * from forum_inhoud WHERE topic_id='$topic_id' order by post_id DESC";
$query2 = "select * from forum_inhoud WHERE topic_id='$topic_id' order by post_id DESC";
//Query's uitvoeren
$result1 = mysql_query($query2, $dbc) or die (mysql_error ());
$result2 = mysql_query($query2, $dbc) or die (mysql_error ());
$row1 = mysql_fetch_array($result1);
$topic_name = $row1['parent2']
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<style type="text/css">
<!--
.style7 {
font-size: 10px;
font-style: italic;
}
.style8 {
font-size: 16px;
font-weight: bold;
}
.style10 {font-size: 16px}
.style11 {
font-size: 12px;
font-style: italic;
}
-->
</style>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Topic</title>
</head>
<body>
<div align="center">
<p><span class="style6 style8"><span class="style6 style10">Topic: <em><?php echo $topic_name; ?><br />
</em></span></span>
<?php while($row = mysql_fetch_array($result2)) {?>
</p>
<table width="800" border="1">
<tr>
<td width="200" border="1">
<div align="center"><em>Gepost door: </em><strong><br />
<?php echo $row['maker']; ?></strong></div></td>
<td height="22"><div align="center" class="style4">
<p align="center"><span class="style11">Bericht:</span><br />
<?php echo $row['inhoud']; ?></p>
</div></td>
</tr>
</table>
<table width="800">
<tr>
<td>
<div align="center" class="style7">Gepost op: <?php echo $row['datum']; ?> </div> </td>
</tr>
</table>
<p><br />
<?php } ?>
<br />
</p>
<table width="385" border="1">
<tr>
<td><form id="form1" name="form1" method="post" action="/paginas/forum/handlers/handle_postreply.php?topic_id=<?php echo $topic_id; ?>">
<div align="center">
<p class="style4"><strong>Reply:</strong></p>
<p>
<textarea name="reply" rows="8" cols="60"></textarea>
</p>
</div>
<p align="center">
<label></label>
<input type="submit" name="Submit" value="Post reply!" />
</p>
</form>
</td>
</tr>
</table>
<p> <br />
<br />
</p>
</div>
</body>
</html>
<?php
mysql_close()
?>
</div>
1.405 views