Laman

Sabtu, 03 April 2021

PHP mysqli_connect()

Syntax:

mysqli_connect( host,username,password,dbname,port,socket ) ;

Contoh: 

 <?php

$con = mysqli_connect("localhost","my_user","my_password","my_db");

// Check connection
if (mysqli_connect_errno())
  {
  echo "Failed to connect to MySQL: " . mysqli_connect_error();
  }
?>


Kursus LPIA:

Tidak ada komentar:

Posting Komentar