Problem scenario
Using PHP you want to connect to a specific database to run SQL queries. How do you do this?
Solution
Assuming you have installed PHP and Postgres on the same Ubuntu Linux server, install the php-pgsql package. Follow this link if you need assistance.
1. Create a file like this named contint.php:
<?php
$host
…
Continue reading “How Do You Connect to a Specific Database in Postgres Using PHP?”