Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- psql DATABASE;
- alter user timir with encrypted password 'banan';
- \q
- mcedit test1.php
- <html>
- <head>
- <title>PostgreSQL i php</title>
- </head>
- <body>
- <h1> TEST </h1>
- <?php
- // tu umieszczamy kod skryptu
- // Połączmy się z bazą danych i rozłączmy się z nią
- $dbh = pg_connect("dbname='DATABASE' user='timir'
- password='banan' host=bazy.eti.pg.gda.pl") or die("Nie moge
- polaczyc sie z baza danych !");
- // tu powinno byc polaczenie
- echo "Jest Polaczenie z baza danych ! ";
- pg_close($dbh);
- ?>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement