new mysqli vs mysqli_connect

One is for Procedural style programming and other is for OOP style programming. Both serve the same purpose; Open a new connection to the MySQL server

OOP Style usage

$mysqli = new mysqli('localhost', 'my_user', 'my_password', 'my_db');

Procedural Style usage

$link = mysqli_connect('localhost', 'my_user', 'my_password', 'my_db');

Reference: PHP Manual


Right on @Hanky Panky. I'd also add to that the PHP docs:

http://www.php.net/manual/en/mysqli.construct.php

Note:

OO syntax only: If a connection fails an object is still returned. To check if the connection failed then use either the mysqli_connect_error() function or the mysqli->connect_error property as in the preceding examples.

So error handling is just one difference.

Tags:

Php

Mysqli