I am using this php to test if I am connected in a postgree database, works very well, but how can I insert a error Message and a Message showing the database is connected and not connected?
Example: like: You are connect to:database_name
or:
You could not connect to:database_name
That is my code:
<?php
$connection = pg_connect ("host=localhost dbname=site user=postgres password=root");
?>