0 points

mysqli - chequear conexión


dashboard

Tue Nov 03 2020 07:57:15 GMT+0000 (UTC)

Posted 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_copy Copy