The problem is in your connection code. You are OR'ing the $password variable with the trigger_error() statement, inside the mysqli_connect() statement. That makes no sense. The php.net documentation has examples showing how to use mysqli_connect(). You would also typically select the database when you make the connection, as a parameter the connection call, though this is not required.
You are also not using the mysqli_error() statement correctly. It REQUIRES the connection link as a parameter, which also means you cannot use it to get error information about the connection. Again, this is covered in the php.net documentation, for both just the mysqli_error() statement and code examples that include the use of the mysqli_error() statement in them.
In your recent threads, the PDO extension was mentioned as well. You should use it instead of the mysqli extension. It is more consistent and easier to use then the msyqli extension, especially if you are using prepared queries.
Speaking of using prepared queries, you should use them when you are putting data values into an sql query statement. They eliminate the need to escape string data, which is (still) open to sql injection if not used correctly and with correct character encoding set for a database connection. Prepared queries prevent sql injection by separating the data from the sql query statement. Both the PDO and msyqli extensions support prepared queries.
Next, both the PDO and mysqli extensions support using exceptions for errors. You should use exceptions for errors. This will eliminate the need for things like the or trigger_error() / or die(), and conditional logic around database statements that can fail, simplifying all your logic. You can just enable exceptions (done slightly different between the PDO and msyqli extensions) and any errors will throw an exception. You can just let php catch the exception and handle the error, in which case php's error_reporting and display_errors/log_errors settings determine what happens with the error information, or you can catch the exception in your code, with a try/catch block, and handle the error yourself. If you let php do this, you will get a fatal uncaught exception error that also contains the actual database error information.
Lastly, the only big gotcha of using PDO, is that it emulates prepared queries by default and has a setting that you need to turn off so that real prepared queries get used.