Advertisement
Guest User

db.php

a guest
Nov 5th, 2017
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.37 KB | None | 0 0
  1. <?php
  2.     $db_host = "localhost";
  3.     $db_name = "test3";
  4.     $db_user = "cargoentry";
  5.     $db_pass = "1234567890";
  6.    
  7.     try{
  8.         $db_con = new PDO("mysql:host={$db_host};dbname={$db_name}",$db_user,$db_pass);
  9.         $db_con->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
  10.     }
  11.     catch(PDOException $e){
  12.         echo $e->getMessage();
  13.     }
  14.    ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement