<?php
//mysqli_select_db('ki223469_temp',mysqli_connect('167.86.88.15','ki223469_temp','m0bi.2018$'))or die(mysqli_error());
?> 
<?php
$con = mysqli_connect("167.86.88.15","ki223469_temp","m0bi.2018$","ki223469_temp");

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

 <?php
// $servername = "167.86.88.15";
// $username = "ki223469_temp";
// $password = "m0bi.2018$";

// // Create connection
// $conn = new mysqli($servername, $username, $password);

// // Check connection
// if ($conn->connect_error) {
//   die("Connection failed: " . $conn->connect_error);
// }
$con = mysqli_connect("localhost","ki223469_temp","m0bi.2018$","ki223469_temp");

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

  date_default_timezone_set("Africa/Nairobi"); 
?> 

<?php
$hostname_conMarketer = "localhost";
$database_conMarketer = "ki223469_temp";
$username_conMarketer = "ki223469_temp";
$password_conMarketer = "m0bi.2018$";
$database = "ki223469_temp";
$charset = 'utf8mb4';


// $conMarketer = mysql_pconnect($hostname_conMarketer, $username_conMarketer, $password_conMarketer) or trigger_error("Con Error:".mysql_error(),E_USER_ERROR); 
// mysql_select_db($database) or trigger_error(mysql_error());

// mysql_select_db('mobisky_temp',mysql_connect('localhost','mobisky_temp','m0bi2016'))or die(mysql_error());

   try {
    $conn = new PDO("mysql:host=$hostname_conMarketer;dbname=$database_conMarketer", $username_conMarketer, $password_conMarketer);
    // set the PDO error mode to exception
    $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
   //echo "Connected successfully"; 
    }
catch(PDOException $e)
    {
    echo "Connection failed: " . $e->getMessage();
    }  

?>