I found a project made in PHP OO to be used in PostgreSQL with this connection file.
<?php
class BD {
public function __construct() {
pg_connect("host=localhost port=5432 user=usuario password=senha dbname=nome_do_BD")
or die("Erro ao conectar ao servidor");
}
public function __destruct() {
//pg_close();
}
}
?>
How can I change this file to access DB in phpMyAdmin?
I'm using WampServer.
I tried this, but to no avail:
<?php
class BD {
public function __construct() {
pg_connect("host='localhost' user='root' password='' dbname='nome_do_BD'")
or die("Erro ao conectar ao servidor");
}
public function __destruct() {
//pg_close();
}
}
?>