If you removed exactly what you said you removed and only that, your removal of the mysqli_real_escape_string($db,$_GET['results'])
declaration will make your query invalid.
To get it working again, you need to touch up your query:
$sql = mysqli_query(
$db,
sprintf(
"SELECT * FROM searchengine WHERE pagecontent LIKE '%s' LIMIT 0,20",
'%'. mysqli_real_escape_string($db,$_GET['term']) .'%'
)
);
Make sure your LIMIT
is set to your liking, as you won't have the option to change it at runtime now that you've removed that option selection from your code.