Q:

Uncaught argumentCountError

I am having error here it says that i have uncaught arugmentcount error but I am just following the tutorial it has no error but when I do it has.  I checked all the possible errors even the spelling and semi colons   

Fatal error: Uncaught ArgumentCountError: Too few arguments to function database::bind(), 1 passed in C:\xampp\htdocs\ooplogin\index.php on line 15 and at least 2 expected in C:\xampp\htdocs\ooplogin\classes\database.php:35
  Stack trace:
  #0 C:\xampp\htdocs\ooplogin\index.php(15): database->bind(':title, :$title')
  #1 {main} thrown in C:\xampp\htdocs\ooplogin\classes\database.php on line 35

this is my code example for index.php
<? php
require 'classes/database.php';

$database = new database;

$database->query('SELECT * FROM post');
$rows = $database->resultset();

$post = filter_input_array(INPUT_POST, FILTER_SANITIZE_STRING);

if($post['submit']){
    $title = $post['title'];
    $body = $post['body'];
    $database->query('INSERT INTO post(title, body) VALUE (:title, :body)');
    $database->bind(':title, :$title');
    $database->bind(':body, $body');
    $database->execute();
    if($database->lastInsertId()){
        echo '<p>Post Added!</p>' ;
    }

}

? >
    <h1>Add Post</h1>
    <label>Post Title</label>
    <br />
    <form method="post" action=" <? php $_SERVER['PHP_SELF']; ? >">
        <input type="text" name="title" placeholder="Add Title..">
        <br />
        <label>Post Body</label>
        <br />
        <textarea name="body" cols="30" rows="10"></textarea>
        <br>
        <input type="submit" name="submit" value="submit">
    </form>
    <h1>POSTS</h1>
    <div>
        <? php foreach($rows as $row) : ? >
        <div>
            <h3>
                <? php echo $row['title']; ? >
            </h3>
            <p>
                <? php echo $row['body']; ? >
            </p>
        </div>
        <? php endforeach; ? >
    </div>

and for classes/database.php`

    <? php

class database{
    private $host = 'localhost';
    private $user = 'root';
    private $password = '';
    private $dbname = 'oopdtbs';

    private $dbh;
    private $error;
    private $stmt;

    public function __construct(){
        // Set DSN
        $dsn = 'mysql:host='.  $this->host . '; dbname='.  $this->dbname;
        // Set Options
        $options = array(
            PDO::ATTR_PERSISTENT        => true,
            PDO::ATTR_ERRMODE       => PDO::ERRMODE_EXCEPTION
        );
        // Create new PDO
        try {
            $this->dbh = new PDO($dsn, $this->user, $this->pass, $options);
        } catch(PDOEception $e){
            $this->error = $e->getMessage();
        }
    }

    public function query($query){
        $this->stmt = $this->dbh->prepare($query);
    }

    public function bind($param, $value, $type = null){
        if(is_null($type)){
            switch(true){
                case is_int($value):
                    $type = PDO::PARAM_INT;
                    break;
                case is_bool($value):
                    $type = PDO::PARAM_BOOL;
                    break;
                case is_null($value):
                    $type = PDO::PARAM_NULL;
                    break;
                    default:
                    $type = PDO::PARAM_STR;
            }
        }
        $this->stmt->bindValue($param, $value, $type);
    }

    public function execute(){
        return $this->stmt->execute();
    }

    public function lastInsertId(){
        $this->dbh->lastInsertId();
    }

    public function resultset(){
        $this->execute();
        return $this->stmt->fetchAll(PDO::FETCH_ASSOC);
    }
}

A:

You're passing just 1 argument in ->bind(..) calls.  I fixed that, and I also fixed the typos. 
Replace:
 $database->bind(':title, :$title');
 $database->bind(':body, $body');

With these lines: 
 $database->bind(':title', $title);
 $database->bind(':body', $body);

