<?php
try {
    $bdd = new PDO('mysql:host=localhost;dbname=gsb','root',''); //Connexion à la bdd
} catch (Exception $e){
    die('Erreur : '.$e->getMessage()); //Affiche le message de l'erreur
}

$req = $bdd->prepare('SELECT ID FROM membres WHERE sNom = :nom AND sPrenom = :prenom');
$req->execute(array('nom' => $_GET['cNom'], 'prenom' => $_GET['cPrenom']));

$resultat = $req->fetch();

if (!$resultat) {
    echo 'Mauvais identifiant ou mot de passe !<br/>';
    echo "<a href=index.html>Retour</a>";
} else {
    session_start();
    $_SESSION['Nom'] = $_GET['cNom'];
    $_SESSION['Prenom'] = $_GET["cPrenom"];

    echo 'Vous êtes connecté !<br/>';
    echo "<a href=Test.php>Continuer sur le site</a>";
}
?>
