product overview
The following example shows how to connect to a MySQL database using the mysqli() library:
mysqli()
<?php DEFINE('DB_USERNAME', 'root'); DEFINE('DB_PASSWORD', 'root'); DEFINE('DB_HOST', 'localhost'); DEFINE('DB_DATABASE', 'performance_schema'); $mysqli = new mysqli(DB_HOST, DB_USERNAME, DB_PASSWORD, DB_DATABASE); if (mysqli_connect_error()) { die('Connect Error ('.mysqli_connect_errno().') '.mysqli_connect_error()); } echo 'Connected successfully.'; $mysqli->close(); ?>