I am recieving folloing error for my code. Please help me out guys.
Warning: Missing argument 1 for user::__construct(), called in C:\wamp\www\oop\index.php on line 8 and defined in C:\wamp\www\oop\loader\user.php on line 5
and this one
Notice: Undefined variable: Cr in C:\wamp\www\oop\loader\user.php on line 7
Index.php
<?php
function __autoload($class)
{
include "Loader/$class.php";
}
$user1 = new user;
echo $user1->userCreate("Blue");
?>
user.php
<?php
class user {
protected $userOne;
public function __construct($Cr)
{
$this->userOne = $Cr;
}
public function userCreate() {
return $this->userOne." User Created ";
}
public function userDelete() {
return $this->userOne."user deleted";
}
}
?>