Which function is used to connect with database in PHP?
Ask by zack mathews
Updated 22 Sep 2020
PHP provides mysqli_connect() function to connect with database. This function has five parameter:
a) Server: The host name running the database. If not defined then by default it is ocalhost.
b) User: The username who is accessing the database.
c) Password: The password given by the user who is accessing the database.
d) new_link(): no new connection will be established.
e) Client_flags : MYSQL_CLIENT_COMPRESS-use Compression protocol.