Conversion to msqli

Hello, I have a PHP5 code (hosted with Free) that I need to convert to PHP8 because it no longer works. I’m starting with the database connection code: Original: <link />
$link = mysql_connect ($host,$user,$pass) or die (); mysql_select_db($db);
They changed it to:
$link = mysqli_connect($host, $user, $pass, $db); // Vérification de la connexion if (!$link) { die("Échec de la connexion : " . mysqli_connect_error()); }
I’m getting the error: Fatal error: Call to undefined function: mysqli_connect() Why ?? And how to fix it? - Thanks

1 answer

  1. Hello,

    Is mysqli installed correctly?


    0