Changed from mysql to mysqli and sqlite to sqlite3, using object oriented database functions now