I'm making sort of a forum, but not exactly. This page which contains the error has to get information from the database (mysql) and prints it out. Surprisingly the script does nothing wrong, except for that is prints out an error. And I don't know what's wrong.
<?php
$stelling = // Makes a connection to a database.
$query = "SELECT FROM stelling where 1";
$result = mysql_query($query) or die ("Mislukt!");
while(list($stelling, $naam, $email, $tekst, $teller, $datum, $msgid, $reply) = mysql_fetch_row($result)) {
if ($reply == "0" ) {
$rquery = "SELECT FROM stelling where reply = $msgid order by date DESC";
$rresult = mysql_query($rquery) or die ("Mislukt!");
$teller = mysql_num_rows($rresult);
$rdatum = mysql_fetch_row($rresult);
list ($datum, $tijd) = split (" ", $rdatum[5]);
list ($datumjaar, $datummaand, $datumdag) = split ("-", $datum);
print ("<tr><td BGCOLOR=#CCCCCC align=left valign=middle><blockquote><img src=voor.PNG border=0><a href=\"stelling2.php?msgid=$msgid\" class=nav1> $stelling</a></td>
<td BGCOLOR=#CCCCCC align=center>$teller</td>
<td BGCOLOR=#CCCCCC align=center>$datumdag-$datummaand-$datumjaar $tijd</td>
</tr>");
<tr><td BGCOLOR=#CCCCCC align=left valign=middle><blockquote><img src=map.PNG border=0><a href=\"stelling2.php?msgid=$msgid\" class=nav1> $stelling</a></td>
<td BGCOLOR=#CCCCCC align=center>$teller</td>
<td BGCOLOR=#CCCCCC align=center>$datumdag-$datummaand-$datumjaar $tijd</td>
</tr>
} else { }
}
mysql_close($stelling);
?>
Error states that the error-line is this one:
mysql_close($stelling);
You can see the 'result' here:
http://www.greatcorners.com/~bbootsma/stellingen/stelling.php
Cheers