I am writing this simple code. I used this class in PHP 10 minutes ago and now when I did it again it gives me this error. I cannot see the difference
<?php
class user
{
public $Username;
public $FullName;
public $Password;
public $LoggedIn;
public $JoinDate;
public function changePassword($newPass)
{
$this->Password = md5($newPass);
{
}
$user = new user();
$user->Username = 'Username';
$user->FullName = 'Name';
$user->Password = 'password';
echo $user->Username;
echo $user->changePassword($newPass);
?>
This is the error I get:
Parse error: syntax error, unexpected $end in C:\xampp\htdocs\Lessons\Arrays\test.php on line 26
I would really appreicate someones help in this as I am new to OOP in PHP.
Thanks