That section of code isn't used in MySQLi... you can delete lines 59-92.
On lines 191-201, that appears to be leftover code from mySQL. The MySQLi version is different. I'd just delete the <a> tag around the text and re-apply the server behaviors to add the navigation back.