$query = "$query city LIKE '%$city%'";
The LIKE usage above is telling mysql to do a wildcard search, providing exactly the results you describe.
try:
$query = "$query city = '$city'";
This should only match "Hatford" with "Hatford". Note, it will return nothing (as would your original code) if your user inputs "hatford" - case matters. MySQL will help you here too by allowing you to convert both sides of the = to the same case, eg: (typing this from memory here, some debugging may be required)
$query = "$query UPPER(city) = UPPER('$city')";
now an input of "hatfield" will match data of "Hatfield", "hatfield", "HATFIELD" or even "hAtfiELd".