PHP mysqli_connect_error() Function returns description of the error from the last connection incase of a failure. If the connection is successful, then it returns Null.
PHP Version : PHP 5, PHP 7
Syntax for mysqli_connect_error():
According to Procedural,
mysqli_connect_error();
According to Object oriented,
$mysqli -> connect_error
Return values for mysqli_connect_error():
It returns error description if connection is failed. It returns NULL if connection is successful.
Example for mysqli_connect_error():
Let's see below example to understand php mysqli_connect_error() Function in details.
Comments