Advertisement
Guest User

Untitled

a guest
May 28th, 2017
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. psql DATABASE;
  2. alter user timir with encrypted password 'banan';
  3. \q
  4.  
  5. mcedit test1.php
  6.  
  7. <html>
  8. <head>
  9. <title>PostgreSQL i php</title>
  10. </head>
  11. <body>
  12.  
  13. <h1> TEST </h1>
  14. <?php
  15. // tu umieszczamy kod skryptu
  16. // Połączmy się z bazą danych i rozłączmy się z nią
  17. $dbh = pg_connect("dbname='DATABASE' user='timir'
  18. password='banan' host=bazy.eti.pg.gda.pl") or die("Nie moge
  19. polaczyc sie z baza danych !");
  20. // tu powinno byc polaczenie
  21. echo "Jest Polaczenie z baza danych ! ";
  22. pg_close($dbh);
  23. ?>
  24. </body>
  25. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement