DISCLAIMER: This code is untested.
I went through your code and tried to clean it up. For all the places I made modifications (other than formatting), I tried to place comments explaining what I did and why I did it. Although I feel that there is more that can be done, this should help you out a bit.
This would be for the initial filter page.
<!-- I would think SESSION would be a better place to store the user name rather than POST -->
<p> Thank You For Logging In [<?php echo $_POST["name"];?>] Here Are The Titles Available
<br /><br />
More Search options 
<!-- Opening [select] outside of the form, without a matching closing select -->
<!--<select>-->
<!-- [more] and [less] aren't valid HTML options here -->
<!--<form action="results.php" method="post" more="morethan" less="lessthan">-->
<form action="results.php" method="post">
<!-- The select object needs a name to be referenced by -->
<!--<select>-->
<select name="priceFilter">
<!-- The options need values -->
<!--**<option>More Than</option>-->
<!--**<option>Less Than</option>-->
<option value="morethan">More Than</option>
<option value="lessthan">Less Than</option>
<!-- Is there any reason for this blank [option]? -->
<!--**<option></option>-->
</select>
<!-- You already started your form earlier, no need for it here. -->
<!--<form method="post" action="results.php">-->
<!-- You may want to put in a few more attributes here, such as size and maxlength -->
<input type="text" name="price" />
<input type="submit" />
</form>
</p>
This is for results.php
<?php
$conn = pg_connect("host=database.dcs.aber.ac.uk port=5432 dbname=teaching user=csguest password=r*****");
// There is no reason for this
# $_POST["lessthan"];
// This if statment needs to be adjusted
# if ($_POST["lessthan"])
# {
# echo $res = pg_query ($conn, "select * from TopGames where price < $_POST[price]");
# }
# else
# {
# echo $res = pg_query ($conn, "select * from TopGames where price > $_POST[price]");
# }
//
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
// You need to sanatize the User Input!!!
// I'm not doing it here because it is out of the scope of the problem
// You probably want to also check that they are valid values (numeric, non-negative, etc...)
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
//
$lsCleanedPriceFilter = $_POST['priceFilter'];
$lfCleanedPrice = floatval($_POST['price']);
// I'll just do a switch instead of an if. I feel it is cleaner and is more scalable in this instance
switch ($lsCleanedPriceFilter)
{
// It is a bad practice to use [select * from ...], but since I don't know the table structure, I'll leave it as is
case "lessthan":
$res = pg_query ($conn, "select * from TopGames where price <= " . $lfCleanedPrice . ";");
break;
case "morethan":
$res = pg_query ($conn, "select * from TopGames where price >= " . $lfCleanedPrice . ";");
break;
default:
$res = pg_query ($conn, "select * from TopGames;");
break;
}
echo "<table border='1'>";
// Using a bit more descriptive variable name
# while ($a = pg_fetch_row($res))
// It may be helpful to display the column headers, although I'm not doing it here
while ($laRow = pg_fetch_row($res))
{
echo "<tr>";
// Why not just use [foreach] instead of asking the database for the number of fields each time?
# for ($j = 0; $j < pg_num_fields($res); $j++)
# {
# echo "<td>" . $a[$j] . "</td>";
# }
foreach ($laRow as $lsColumn)
{
echo "<td>" . $lsColumn . "</td>";
}
echo "</tr>";
}
echo "</table>\n";
?>