title: difficulties in registering and login
body: <p>Here is the code:</p>
  
  <pre><code>include_once('class.database.php'); 
  
  class ManageUsers{
      public $link;
  
      function __construct(){
          $db_connection = new dbConnection();
          $this-&gt;link = $db_connection-&gt;connect();
          return $this-&gt;link;
      }
  
      function registerUsers($password, $ip_address, $date, $time, $username, $email, $uname){
          $query = $this-&gt;link-&gt;prepare("INSERT INTO users (password,ip_address,date,time,username, email, uname) VALUES(?,?,?,?,?,?,?)");
          $values = array ($password, $ip_address, $date, $time, $username, $email, $uname);
          $query-&gt;execute($values);
          $count = $query-&gt;rowCount();
          return $count;
      }
  
      function LoginUsers($username, $password){
          $query = $this-&gt;link-&gt;query("SELECT * FROM users WHERE username='$username' AND password='$password'");
          $rowCount = $query-&gt;rowCount();
          return $rowCount;
      }
      function GetUserInfo($username){
          $query = $this-&gt;link-&gt;query("SELECT * FROM users WHERE username = '$username'");
          $rowCount = $query-&gt;rowCount();
          if($rowCount ==1)
          {
              $result = $query-&gt;fetchAll();
              return $result;
          }
          else
          {
              return $rowCount;
          }
      }
  
  }
  </code></pre>
  
  <p>and it is showing me this error</p>
  
  <blockquote>
    <p>Fatal error: Call to a member function query() on a non-object in
    C:\wamp\www\timetable\class.ManageUsers.php on line 22</p>
  </blockquote>