mysqli_connect_error

(PHP 5)

mysqli_connect_error -- Returns a string description of the last connect error

Description

string mysqli_connect_error ( void )

Returns the last error message string from the last call to mysqli_connect().

Return Values

A string that describes the error. An empty string if no error occurred.

Examples

Example 1. mysqli_connect_error() example

<?php

$link
= @mysqli_connect("localhost", "nonexisting_user", "");

if (!
$link) {
    
printf("Can't connect to localhost. Error: %s\n", mysqli_connect_error());
}
?>


Follow phpf1 on Twitter




F1 Site Family
AJAX F1
CSS F1
Database F1
Flash F1
HTML F1
Java F1
JavaScript F1
PhotoShop F1
PHP F1
Scripts F1
Tutorial F1
Windows F1

Total time: 0.0325