I'm new in this cpanel and I want to ask how to connect to Postgres in cpanel using php?
I use this simple code
<?php
$dbconn = pg_connect("host=localhost port=5432 dbname=test user=domain_test password=test")
or die('connection failed: ' . pg_last_error());
?>
and It keep on returning connection failed on my browser,
can somebody tell me how to do it correctly?
. pg_last_error()contains nothing... its empty.. sorry.. i will include it right away...