mysqli_error() expects parameter 1 to be mysqli, null given ERROR

71
February 12, 2019, at 09:10 AM

I'm setting up a new server and having some issues with outdated coding

mysqli_error() expects parameter 1 to be mysqli, null given in C:\xampp\htdocs\core.php on line 160

I've read all the other responses for these types of issues

function config($key) {
  global $connection;
  $request = mysqli_query($connection, "SELECT value FROM cms_system WHERE systemVar = '{$key}'") or die(mysqli_error($connection));
  $result = mysqli_fetch_assoc($request);
  return $result['value'];
}
READ ALSO
mysql composite primary key with dates [on hold]

mysql composite primary key with dates [on hold]

I have a table with 3 columns

27
Sql Query to present NULL rows

Sql Query to present NULL rows

I have a simples table:

55
Logging in in PHP while logging data is AES encrypted

Logging in in PHP while logging data is AES encrypted

My SQL table contains two types of data used to log inFirst is email(In table named standard_name) and second is password

63
How to setup a Linux development server using Docker to support multiple versions of PHP and MySQL

How to setup a Linux development server using Docker to support multiple versions of PHP and MySQL

I have many PHP projects, and each project requires different PHP and MySQL versionsI want to setup a Docker machine that runs multiple instances of the server with specific versions of PHP and MySQL

39