Which function is used to connect with database in PHP? zack mathews155126-Sep-2016 phpphp Updated on 22-Sep-2020
KIRTI SHARMA
08-Mar-2017zack mathews
26-Sep-2016PHP 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.