English
Tamil Nadu Board of Secondary EducationHSC Science Class 12

Write MySQL Connection Syntax with example.

Advertisements
Advertisements

Question

Write MySQL Connection Syntax with example.

Answer in Brief
Advertisements

Solution

Syntax:

mysqli_eonnect(“Server Name”, “User Name”, “password”, “DB Name”);

Example:

<?php
Sservername = “localhost”;
Susername = “username”;
Spassword = “password”;
$DB_name = “SchooLDB”;
// Create connection
$conn = mysqli_connect($servemame, Susername, Spassword,$DB_name);
shaalaa.com
MYSQL Function in PHP
  Is there an error in this question or solution?
Chapter 9: Connecting PHP and MYSQL - Evaluation - PART – III [Page 132]

APPEARS IN

Samacheer Kalvi Computer Applications [English] Class 12 TN Board
Chapter 9 Connecting PHP and MYSQL
Evaluation - PART – III | Q 3. | Page 132
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×