I'm trying to write some (very basic) PHP and SQL to connect to a database, so that I can get some information from the database and display it in a table on my webpage.
The code I have written so far is this:
Code: Select all
<?php
$conn = pg_connect("host=localhost port=**** dbname=******** user=******* password=*******");
if(!$conn){
die('Could not connect: ' . pg_error());
}
?>Just wondering if anyone can point out where I'm going wrong, and what I should do to correct it? Cheers.