2019-04-18 18:37:23 +02:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* Created by PhpStorm.
|
|
|
|
* User: REMI
|
|
|
|
* Date: 16/04/2019
|
|
|
|
* Time: 14:46
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
function connexionBD(){
|
|
|
|
$host = "localhost";
|
2019-04-18 19:36:20 +02:00
|
|
|
$dbname = "projet";
|
|
|
|
$user = "utilisateur";
|
|
|
|
$pass = "-stri-";
|
|
|
|
$db = pg_connect("host=$host port=5432 dbname=$dbname user=$user password=$pass") or die("Erreur lors de la connexion à la base de données.");
|
2019-04-18 18:37:23 +02:00
|
|
|
return $db;
|
|
|
|
}
|
2019-04-28 14:53:08 +02:00
|
|
|
?>
|
2019-04-18 18:37:23 +02:00
|
|
|
|