title: Call to undefined method PDO::execute()
body: <p>i'm trying to code a page login but i was stopper at this error </p>
  
  <p>pliz tell me the wrong thing here </p>
  
  <pre><code>&lt;?php
  @session_start();
  include("../../connexion/connexion.php");
  class login_class {
          public $user;
          public $password;
          public $connexion;
      public function check_login() {
          try {
              $cn = new class_connect();
              $this-&gt;connexion = $cn-&gt;connect(null);
              $result = $this-&gt;connexion-&gt;execute("select * from user where username='$this-&gt;user' and password='$this-&gt;password'");
  
                          $data = $result-&gt;fetchAll(PDO::FETCH_OBJ);
  
  
              if (!empty($data[0]-&gt;id_user)) {
                  return true;
              }else {
                  return false;
              }
          }catch(PDOException $ex) {  
              echo $ex-&gt;getMessage();
          }
      }
      public function __construct($user) {
          if($user){
              $this-&gt;user = $user["username"];
              $this-&gt;password = $user["password"];
          }
      }
  
  }
  ?&gt;
  </code></pre>