<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<meta name="author" content="Manuele" />
<title> Connexion BdD</title>
</head>
<body>
<h1>Connexion</h1>
<?php
$host = "localhost";
$user="uml"; /* n'oubliez pas de definir cet user et mdp a travers phpmyadmin */
$mdp="uml"; /* et de lui donner les privileges d'acces local pour cette bdd */
$bdd = "clientsBD";
$mysqli = new mysqli($host, $user, $mdp, $bdd) ;
if ( $mysqli->connect_errno ) {
die ("<p> Impossible de connecter à $bdd sur $host : "
. $mysqli->connect_error . " </p>" ) ;
}
else {
echo "<p> Connecté au serveur $host, à la base $bdd </p>";
$mysqli->close();
}
?>
</body>
</html>