/ Published in: PHP

Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
try { $db = new PDO("pgsql:dbname=dbname;host=localhost", "username", "password" ); echo "Database connection established.\n"; $db = null; } catch(PDOException $e){ echo $e->getMessage(); }
Comments
