Answers for "php connect to mysqli"

PHP
1

mysqli_connect

// mysqli_connect is an alias of mysqli::__construct()
$mysqli = new mysqli("host", "user", "password", "database", 'port', 'socket');
Posted by: Guest on August-26-2021
1

mysqli connect

mysqli_connect(host, username, password, dbname, port, socket)
Posted by: Guest on June-02-2021
1

mysqli connect

<?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();

  }
?>
Posted by: Guest on November-12-2020

Browse Popular Code Answers by Language