<?php $pgsql_conn = pg_connect("dbname=mark host=localhost"); if ($pgsql_conn) { print "Successfully connected to port: " . pg_port($pgsql_conn) . "<br/>\n"; } else { print pg_last_error($pgsql_conn); exit; }?>