thank you Derek C for your help and I tried that and no luck my server will not support it, but I have fond a different way that way is to use the $conn = pg_connect method this is what I have so far in my server
this example is from the webpage http://www.php.net/manual/en/function.pg-connect.php everything works great but If i put in a invalid password then then it still lets me in but if there is a vaild user and database then it lets me me, any thoughts of my they password is not working correectly
dbconn3 = pg_Connect ("user=lamb password=baaaa dbname=mary ");
//connect to a database named "mary" with a username and password