mostly working but without PDO

Mostly using mySQLi