• Categories
    • PHP
    • phpMyAdmin
    • PHPMailer
    • FFMpeg
    • PHPEXcel
    • PHPDoc
    • PHPUnit
    • CakePHP
    • CakePHP 2.0
    • Cake PHP 2.1
    • CakePHP Model
    • Facebook PHP SDK
    • composer-php
    • PHP 7
    • PHP GD
    All Categories
  • About

Fatal error: Uncaught mysqli_sql_exception: Unknown database 'test' in ... (How do I fix that? Using PHP)

phpmysqlmysqli


PHP Snippet 1:

<?php
$mysqli = new mysqli("localhost","my_user","my_password","my_db");

// Check connection
if ($mysqli -> connect_errno) {
  echo "Failed to connect to MySQL: " . $mysqli -> connect_error;
  exit();
}
?>

Related Snippets

Symfony process run throws exception - executing on command line works

Laravel Sanctum CSRF not authenticating

How to make Canonicals with PHP

I want to display a sweetalert after the inserting of data in my database

how to create html table in php

Unsure why I am getting: Number of variables doesn't match number of parameters in prepared statement

Best way to scrolldown onpageload

How to loop sql table data inside a html table

Symfony autowiring issues since docker update

error:14094410:SSL routines:ssl3_read_bytes:sslv3 alert handshake failure

PHP random string generator

Transform array, set each array element with parent key php

Laravel Schedule not sending email

Install mysql client in docker image

JQuery content editable div and text box on submit not sending POST

About Contact Privacy policy Terms and conditions