title: SQL error that i could not figure it out
body: <h1>This is the code:</h1>
  
  <pre><code>&lt;?php
  try
  {
      $bdd = new PDO('mysql:host=localhost;dbname=mydatabase;charset=utf8', 'root', '',array(PDO::ATTR_ERRMODE =&gt; PDO::ERRMODE_EXCEPTION));
  }
  catch(Exception $e)
  {
          die('Erreur : '.$e-&gt;getMessage());
  }
  
  $req = $bdd-&gt;prepare('SELECT nom FROM jeux_video WHERE possesseur = ?');
  $req-&gt;execute(array($_GET['possesseur']));
  
      while($data = $req-&gt;fetch()){
          echo $data['nom'].'&lt;br/&gt;';
      }
  
  $req-&gt;closeCursor();
  </code></pre>
  
  <h1>    ?></h1>
  
  <p>and this is the error:</p>
  
  <p>Notice: Undefined index: possesseur in /opt/lampp/htdocs/openclassroom/index.php on line 12</p>