• Discussion
  • PHP Fata error: Call to undefined function mysli_connect()

Hello Team,
Please I installed Xampp that is running php 7.1.2 on my local computer and tried to run the following codes:
<?php
$username = "root";
$password = "";
$database = "addressbook";
$server = "127.0.0.1";
mysqli_connect($server, $username, $password);
print("Congratulations!, Connection to the server is opened.");
?>
but I keep getting fatal error: Call to undefined function mysqli_connect()

Please help me. I am a beginner .

    Do you have the MySQLi extension installed (use get_loaded_extensions or check the output from phpinfo for a MySQLi section). I don't use Xampp so I don't know what you have to do to install it if you don't already have it. Check your php.ini to see if you haven't disabled it by commenting out its "extension" line.

    Incidentally, PHP 7.1 is out of date and no longer supported.

      The error message is crystal clear: there is no such function in PHP and never has been. There is only a function called mysqli

        Write a Reply...