I am trying to echo the title out as a link, so when it is clicked it will redirect the user to the post.
<?php
$sql = "SELECT title, category FROM posts ORDER BY id DESC LIMIT $offset, $rowsperpage";
$result = mysql_query($sql, $conn) or trigger_error("SQL", E_USER_ERROR);
foreach($posts as $post)
while ($list = mysql_fetch_assoc($result)) {
echo "<h2><a href='post.php?post='.$post->id.>"$list['title']"</a></h2>";
echo "<p>".$list['category']."</p>";
} ?>
' . $list['title'] . '
';` – Sakamaki Izayoi Jul 25 '15 at 18:39