Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $servername = "localhost";
- $username = "postgres";
- $password = "test123";
- $dbname = "testdb";
- $conn = new PDO("pgsql:host=$servername;dbname=$dbname", $username, $password);
- $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
- if(!$conn){
- echo "error in conn";
- } else {
- echo "success";
- }
- ?>
Add Comment
Please, Sign In to add comment