Hi, I am having problem on this, i am creating class connection and I am trying to create simple registration but it says"Call to undefined method Connection prepare() "

Connection.php

PHP Code:
class Connection {

   public  function 
__construct(){
       try{
           
$connection= new PDO('mysql:localhost;dbname=mydb','root','');
           
$connection->setAttribute(PDO::ATTR_ERRMODE,PDO::ERRMODE_EXCEPTION);


       }
       catch(
PDOException $error){
           die (
$error->getMessage());
       }
     }




Genpage.php
PHP Code:
class User {

    public function 
__construct(){


    }


    public function 
Register($username,$password){
        
$dbconn = new Connection();

        
$query $dbconn->prepare('INSERT into tbluser (username,password) values(?,?)');
        
$query ->execute(array($username,$password));


    }



index.php

PHP Code:

  
include_once "User.php";
  include_once 
"Connection.php";

  
$user = new User();

  
$user->Register("jemz","pwd123");