I'm having a hard time new a class in another class. This is an example of the setup:
index.php
<?php
include("functions/userFunctions.php");
$user = new UserFunctions ();
$user->validate();
?>
UserFunctions.php
<?php
include("../db/userDB.php");
class UserFunctions extends UserDB
{
public function GetHello(){
$this->DBHello();
}
}
?>
UserDB.php
<?php
class UserDB
{
public function DBHello(){
return "Hello"
}
}
?>
Chrome returns: HTTP Error 500 (Internal Server Error): An unexpected condition was encountered while the server was attempting to fulfill the request.
How can this not work?