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