Connecting to a database in PHP is a common requirement for web applications. PHP offers several ways to connect to databases, with MySQLi (MySQL Improved) being the most common.
By using mysqli_connect(), we have connect database with our web application.