Problems connecting to BD Cpanel

2

I am uploading my first web page for a client to the internet, the connection to the database in local I have no problems but in the hosting I do not know what is happening, I am trying to connect the DB in Cpanel but apparently there are certain errors that I do not know what they are, create the database which is mirandae_comentarios and password Keisy0518 my file ....

<?php

 $host="mirandaenloscomentarios.com";
 $user="mirandae_miranda";
 $pass="Keisy0518";
 $db="mirandae_comentarios";

$con= new mysqli($host,$user,$pass,$db);

if (!$con) {

    echo "error".$con->error();
}else{

    echo"You are connected";
}

?>

the page: link

before the structure html I aggravate the include"class/conexion.php" and always enter the second else it does not matter that I try to fail the connection when trying to write the name of the wrong database always I'm printing You are connected I do not understand what happens to someone who can guide me so that the connection is needed to be successful in cpanel

    
asked by andy gibbs 01.12.2018 в 04:07
source

0 answers