Home > DeveloperSection > Interviews > Which function is used to connect with database in PHP?

Posted on    September-26-2016 1:26 AM

 PHP PHP 
Ratings:
 1 Answer(s)
  67  View(s)
Rate this:

zack mathews
zack mathews

Total Post:5

Points:25
Posted on    September-26-2016 1:26 AM

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 localhost.

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.


Don't want to miss updates? Please click the below button!

Follow MindStick