mysqli_connect() requires four parameters, which are: -
host name, user name, password, database name (optional) .
So, you need to provide all these parameters. If you do not, you will not be able to connect, and you will receive errors.
Note: - the database name is optional, you can use mysqli_select_db() to further select the database.
source share