Skip site navigation (1) Skip section navigation (2)

Failure to connect to database using php.

From: Vivek Sonny Abraham <vivek(dot)sonny(dot)abraham(at)gmail(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: Failure to connect to database using php.
Date: 2005-06-28 10:36:21
Message-ID: 117cc7bf05062803363df904f0@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-novice
Hi,

I am using the following code to connect to my database.

<?

$db = pg_connect("dbname=friends");
echo pg_dbname();

?>

But there is nothing  displayed on the screen when I try it on my browser.

I use apache 4.3.9, redhat and postgresql 7.4.6. What am I doing wrong?

Responses

pgsql-novice by date

Next:From: Volkan YAZICIDate: 2005-06-28 11:04:06
Subject: Re: Failure to connect to database using php.
Previous:From: Volkan YAZICIDate: 2005-06-28 06:46:30
Subject: Re: Transactions

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group