Few changes and added mysqli connect.