title: function PDO return nothing?
body: <p>I use PDO for my project, so i don't know why my function return nothing...</p>
  
  <pre><code>function getuser($username) {
      require 'database.php';
      $rep = $bdd-&gt;prepare("SELECT * FROM membre where login =:user");
      $rep =$bdd-&gt;execute(
          array(
              'user'=&gt;$username
              ));
  
          while($row = $rep-&gt;fetch(PDO::FETCH_OBJ)) {
              //$userid = $row-&gt;id;
              //$usermail = $row-&gt;email;
              echo $row-&gt;id;
          }
  }
  </code></pre>
  
  <p>and usage:</p>
  
  <pre><code>$uname = $_SESSION['uname'];
  echo $uname;
  //result: kate
  echo getuser($uname);
  //result:
  </code></pre>
  
  <p>I don't know Why it's not work?</p>