Hi, I'm a newbie to database programming with PHP, and I'm hoping if someone can help me out here.
I've successfully installed PHP with Apache on WinXP, and have been coding simple PHP webpages for a few weeks.
Now I need to use PostgreSQL database with PHP. I downloaded pgs 7.4.6 and extracted it to the same root dir as php and apache (WP_Web). I then tried this code to see if it works:
<?
$conn = pg_Connect("host=localhost, user=guest, password=guest, dbname=task");
if (!$conn) {echo "An database connection error occurred.\n"; exit;}
else {echo "You have connected to the database successfully.\n";}
pg_Close($conn);
?>
But I get this error:
Fatal error: Call to undefined function pg_Connect() in C:\WP_Web\Apache2\htdocs\php_db.php on line 2
What do I need to do to configure PostgreSQL with PHP?
I hope someone can help me with this.
Thanks...!
RISH