';
print_r(pdo_drivers());
echo '
';
include 'adatok.php';
try {
$conn = new PDO("pgsql:host=$host;port=$port;dbname=$adatbazis", $user, $jelszo);
// set the PDO error mode to exception
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$sql = "CREATE database ujadatbazis";
// use exec() because no results are returned
$conn->exec($sql);
echo "adatbázis létrehozása sikeres
";
}
catch(PDOException $e)
{
echo $sql . "
" . $e->getMessage();
}
$conn = null;
?>