How to connect database in mysqli

how to connect database in mysqli

$mysqli = new mysqli(‘host’, ‘username’, ‘password’, ‘database’);

try this code:

<?php
$link = mysql_connect(‘localhost’, ‘mysql_user’, ‘mysql_password’);
if (!$link) {
die('Could not connect: ’ . mysql_error());
}
echo ‘Connected successfully’;
mysql_close($link);
?>