rendered paste body<?php $filename = 'entries.html'; $query = "SELECT id, header, content, DATE_FORMAT(entry_date, '%d.%m.%Y') ". "FROM entries ". "ORDER BY id DESC ". "LIMIT 10";$result = mysql_query($query) or die('Error, query failed');list($id, $header, $content, $date) = $row;while ($row = mysql_fetch_array($result)) { $Content = "<div class=\"entry\"><h1>" . $rad[2] . "</h1><div class=\"datestamp\">" . $rad[4] . "</div>, <p>" . $rad[3] . "</p><a href=\"comments.php\">Comment</a>\n" echo $Content; $handle = fopen($filename, 'w'); fwrite($handle, $Content); fclose($handle); }?>