mysqli_connect parameters
snippet in sql

mysqli connect

user1907


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

  }
?>
 

mysqli_connect parameters

user5956

mysqli_connect ( "host", "username", "password", "database_name" )