Editing the script so it uses the newer mysqli