Reformatting
Switched to mysqli function due to planned PHP upgrade