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?
APPEARS IN
RELATED QUESTIONS
Which is the not a correct MySQL Function in PHP?
How many parameter are required for MYSQLi connect function in PHP?
How many parameter are required for MYSQLI Close function in PHP?
What is MySQLi function?
What are the types MySQLi function available PHP?
Give few examples of MySQLi Queries.
What is Connection string?
Write the Syntax for MySQLi Queries.
Write is the purpose of MySQLi function available.
Explain MySQLi Queries with examples.
