How conect my datbase postgresql??

xadrieth

New Member
Messages
62
Reaction score
1
Points
0
You need to use the pg_connect function:
http://php.net/pg_connect

like so:
PHP:
pg_connect('host=localhost dbname=PGSQL_DB_NAME user=PGSQL_DB_USER password=PGSQL_DB_PASS');

Example:
$pg = pg_connect('host=localhost dbname=xadrieth_pgsql user=xadrieth_pg password=fluffykins');

Have the pg_connect be assinged under a variable, it's more useful.
 
Last edited:

xav0989

Community Public Relation
Community Support
Messages
4,467
Reaction score
95
Points
0
However, you must first create a PgSQL database using cPanel.

Click on PostGreSQL Database Wizard, and follow the steps.
 

abisistemas

New Member
Messages
14
Reaction score
0
Points
0
Thank you. Frinds.
Edit:
What is the best version of Linux Fedora, Solaris, Ubuntu??
I need multiuser operating system..

Thanks.
 
Last edited:

xadrieth

New Member
Messages
62
Reaction score
1
Points
0
uBuntu is really friendly, I'm not sure about Fedora.

Solaris isn't Linux, but it's still in the Unix (*nix) family.
 
Top