It was a shocking news to me that i realize i couldn’t connect the postgre database with my wamp, it seems that i check the log and received errors such as:
PHP Warning: PHP Startup: Unable to load dynamic library ‘c:/wamp/bin/php/php5.2.9-2/ext/php_pgsql.dll’ – The specified module could not be found.
in Unknown on line 0
So i went to search on google and tried to replace the modules provided by wamp that seems to be corrupted, download the one below that i have zipped it that is working. you can download it free, just unzip and replace the two files with the one at Drive:/wamp/bin/php/php5.2.9-2/ext/
Now restart your wamp, and try using pg_connect, you should be able to connect it without a hassle = )

Thanks !!
It’s work!!
Nice solution.
Works!
no problem = D