View difference between Paste ID: XNH9b7ju and sUVWtAqH
SHOW: | | - or go back to the newest paste.
1
<?php
2
$serv = "mysql:host=localhost;dbname=test1";
3
$user =	"root";
4
$pass =	"";
5
6
try{
7
	$dbCon = new PDO($serv,$user,$pass) ;
8
	echo"good conect";
9
	$dbCon->setAttribute(PDO::ATTR_ERRMODE,PDO::ERRMODE_EXCEPTION);
10
}
11
catch(PDOException $e){
12
	echo"error" . $e->getMessage();
13
}
14
15
?>