Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $host = "testdb.luruscustomerconnect.com";
- $port = "5432";
- $user = "user2";
- $pass = "userldf";
- $db = "testdb";
- // open a connection to the database server
- $connection = pg_connect ("host=$host port=$port user=$user
- password=$pass");
- if ($connection)
- echo "Connected";
- else
- die("Could not open connection to database server");
- $sql = "CREATE DATABASE testDB;";
- $result = pg_query($dbh, $sql);
- if ($result)
- echo "Table created!";
- else
- die("Error in SQL query: " . pg_last_error());
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement