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.


More articles : Web hosting support, dedicated server administration and useful hosting tools