Implemented the openConnection Function

We made a new variable that is a mysqli object and we're checking whether we can establish a connection, and if not, to output the given error.