Bit of a newbie question, sorry if it's very simple. I'm writing my first PHP script which I want to connect to a Postgres DB, however it seems to fall at the first hurdle. Any suggestions on what I'm doing wrong would be appreciated.
I'm using Apache 2, PHP 4, RHEL 4, Postgres 7.4.
The code I'm using is:
<?php
echo "<h1>Connection Information</h1>";
echo "no error";
$connection = pg_connect("dbname=db_1 user=ijf99 host=ijflnx");
echo "you got this far";
if (!$conn) {
echo "An error occured.\n";
exit;
}
?>
The Connection Info & No error bits are displayed, but after that there is nothing.
Any help appreciated
Thanks!
Ian