English

What is Connection string?

Advertisements

Question

What is Connection string?

Short/Brief Note
Advertisements

Solution

The variables are used to connect to the database server. They are

  1. $servername → Database Server IP address
  2. $usemame → Database Server User Name
  3. $password → Database Server Password
  4. $DB_Name → Database Name

The mysqli connect function uses these variables and connect Database server from PHP scripting. If the connection gets fail, output will be printed with MySQL error code. Otherwise, the connection is a success.

shaalaa.com
MYSQL Function in PHP
  Is there an error in this question or solution?
Chapter 9: Connecting PHP and MYSQL - Evaluation - PART – II [Page 132]
Advertisements
Share
Notifications



      Forgot password?
Use app×