-1

Fatal error: Uncaught Error: Call to undefined function mysqli_connect() in F:\Futgraphics\backup\Website\includes\dbh.inc.php:8 Stack trace: #0 F:\Futgraphics\backup\Website\includes\signup.inc.php(9): require_once() #1 {main} thrown in F:\Futgraphics\backup\Website\includes\dbh.inc.php on line 8

Getting this error when trying to make an account on my website.

dbh.inc.php:


$serverName = "localhost";
$dBUsername = "root";
$dBPassword = "password";
$dBName = "futgraphicsusers";

$conn = mysqli_connect($serverName, $dBUsername, $dBPassword, $dBName);

if (!$conn) {
  die("Connection failed: " .mysqli_connect_error());
}```
Dharman
  • 30,962
  • 25
  • 85
  • 135
Exo
  • 11
  • 1

1 Answers1

-2

Upgrade your php version to the latest one.

Paul Robert
  • 107
  • 5
  • I have the latest one PHP 8.1.7 (cli) (built: Jun 7 2022 21:45:53) (ZTS Visual C++ 2019 x64) Copyright (c) The PHP Group Zend Engine v4.1.7, Copyright (c) Zend Technologies – Exo Jun 18 '22 at 13:05
  • Mysqli has been around since PHP 5.0 and I doubt the OP is using PHP 4 or earlier. The issue most likely that they simply haven't installed and/or enabled the mysqli extension. – M. Eriksson Jun 18 '22 at 13:21