diff --git a/README.md b/README.md deleted file mode 100644 index 4996344..0000000 --- a/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# php-mysql-tutorial -All the course files for the PHP & MySQL for Beginners tutorial on The Net Ninja YouTube channel. - -# how to use -To see the code for a particular lesson, be sure to select that lesson branch from the branch dropdown (top-left). diff --git a/sandbox.php b/sandbox.php new file mode 100644 index 0000000..778284a --- /dev/null +++ b/sandbox.php @@ -0,0 +1,44 @@ +name = 'mario'; + // $this->email = 'mario@thenetninja.co.uk'; + $this->name = $name; + $this->email = $email; + } + + public function login(){ + // echo 'the user logged in'; + echo $this->name . ' logged in'; + } + + public function getName(){ + return $this->name; + } + + public function setName($name){ + if(is_string($name) && strlen($name) > 1){ + $this->name = $name; + return "name updated to $name"; + } else { + return 'not a valid name'; + } + } + + } + + $userTwo = new User('yoshi', 'yoshi@thenetninja.co.uk'); + + // $userTwo->name = 'mario'; + // echo $userTwo->name; + + // echo $userTwo->getName(); + // echo $userTwo->setName('shaun'); + // echo $userTwo->getName(); + +?>