×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: PHP
Posted by: Francesco St
Added: Aug 4, 2016 11:17 AM
Views: 9
Tags: db new setup dba
  1. include("../dba/dba.php");
  2. $dbaobj = new dba;
  3.  
  4. $usr = $dbaobj->getUsr();
  5.  
  6. $pwd = $dbaobj->getPwd();
  7.  
  8. $dbname = $dbaobj->getDBName();
  9.  
  10. try{              
  11. $pdo = new PDO("mysql:host=mysql.hostinger.it;dbname=".$dbname, $usr, $pwd);
  12.     $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
  13.