Hi There..I'm trying to connect to a postgres database and gettin the following error
Fatal error: Call to undefined function: pg_connect() in /home/troyr/public_html/php/test.php on line 18
I have installed the postgres modules for php so i'm not sure where to go from here
<?php
//i have already replaced host,user,password with relevant details
$conn = pg_connect( "host=localhost user=username password=password dbname=phonelist");
// Check for errors connecting to database
if (!$conn) {
echo "An error occured.\n";
exit;
}
?>
Thanks
Troy
Fatal error: Call to undefined function: pg_connect() in /home/troyr/public_html/php/test.php on line 18
I have installed the postgres modules for php so i'm not sure where to go from here
<?php
//i have already replaced host,user,password with relevant details
$conn = pg_connect( "host=localhost user=username password=password dbname=phonelist");
// Check for errors connecting to database
if (!$conn) {
echo "An error occured.\n";
exit;
}
?>
Thanks
Troy