Well of course it does. Look what you have here:
if (isset($_GET['pageno'])) {
$id = $_GET['pageno'];
} else {
$id = 1;
} // if
$query = "SELECT * FROM posts WHERE category=$id ORDER BY id DESC";
You also don't seem to have any pagination in your SQL (lookup the "LIMIT" statement)
Another thing, unreleated, to keep in mind, is that your database is quite vulnerable because you don't properly cleanse the get variable.
following the link
"test.php?pageno=1%3B+DELETE+FROM+posts%3B+SELECT+%2A+FROM+posts" (assuming in this case, the file is named test.php)
... would cause some data loss.