Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

php mysqli connect err0r

<?php
$link = mysqli_connect('localhost', 'fake_user', 'my_password', 'my_db');

if (!$link) {
    die('Connect Error: ' . mysqli_connect_error());
}
?>
  //The mysqli_connect_error() will return a list of connection error(s) if the connection to the db fails
 
PREVIOUS NEXT
Tagged: #php #mysqli #connect
ADD COMMENT
Topic
Name
7+5 =