Switch from MySQL to mysqli

Do no longer use the deprecated extensions, switch to its modern equivalent.