mysqli - chequear conexión

PHOTO EMBED

Tue Nov 03 2020 07:57:15 GMT+0000 (Coordinated Universal Time)

Saved by @samoisamoi12 #html #php

$sgbd=new mysqli("localhost", $user, $pass, "productos");
if (mysqli_connect_errno()){
    echo "Failed to connect to MySQL: " . mysqli_connect_error();
}else{
    echo "Connection successful";
}
content_copyCOPY