a public resource for all things web hosting, systems administration, and dedicated server management.

PHP - PostgreSQL connection

Sample code for connecting to a PostgreSQL database using PHP and simple queries.

The USERNAME, PASSWORD and DATABASE_NAME variables must be substituted with those supplied for your web hosting account.


Did did you find this article useful? Then See also articles on: Web hosting support, dedicated server administration and useful hosting tools