CRUD
This commit is contained in:
14
crud/connect.php
Normal file
14
crud/connect.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
try {
|
||||
|
||||
$host = "localhost";
|
||||
$user = "root";
|
||||
$password = "2487169350";
|
||||
|
||||
// Connexion à la bdd
|
||||
$db = new PDO("mysql:host=$host;dbname=cruddb", $user, $password);
|
||||
$db->exec('SET NAMES "UTF8"');
|
||||
} catch (PDOException $e) {
|
||||
echo 'Erreur : ' . $e->getMessage();
|
||||
die();
|
||||
}
|
||||
Reference in New Issue
Block a user