Problem in Database

why show not connected in my phpdatabase. why is my incorrect? my database code are

<?php $host=""; $user="epiz_20646895"; $pass=" "; $db="epiz_20646895_reg"; $con=mysqli_connect($host,$user,$pass,$db); if(!$con) { print("Not Connected
".mysql_error()); } else { //echo("Connected"); } ?>

please help me :frowning:

@sanauk said:

it depends. but try the following code:

$server = "";
$user = "epiz_XXXXXXXX";
$pass = "XXXXXXXX";
$database = "epiz_XXXXXXXX_YYYY";

$db = new \\PDO( "mysql:host=$server;port=3306;dbname=$database;charset=utf8", $user, $pass );
$sth = $db->prepare( "select 'this comes from mysql' as response" );
$data = [];
while ( $row = $sth->fetch( PDO::FETCH_ASSOC ) )
    $data[] = $row;

just replace the first 3 variables with the data provided in your CP and the 4th line with the database name you should have created.

until you make it work, keep fiddling with the variables. once it works for you, check your own code for whatโ€™s missing.