I was following a video and double checking all code and everything seems to be the same yet I get these errors.
Errors:
Notice: Undefin
As stated in comments, in OOP, you need to use $this->pdo passing the object's property for it, instead of the variable $query = $pdo-> since you've construct'ed it in:
$this->pdo
$query = $pdo->
public function __construct($pdo) { $this->pdo = $pdo; ^^^^^^^^^^ }
I.e.:
$query = $this->pdo->prepare