Q:

Why am I getting a syntax error?

The following snippet gives 2 syntax errors where I check the condition in the if block
public function __construct() {
    if(isset($_POST['update_email')) { # First syntax error
        $this->email = $_POST['update_email'];
    }

    if(isset($_POST['password')) { # Second syntax error
        $this->password = $_POST['password'];
    }
}

I am unable to spot a syntax error. What is it ?

A:

You missing the closing-brackets for the $_POST variables:
This line:
 if(isset($_POST['update_email')) {

Should be:
 if(isset($_POST['update_email'])) {

Same for the password-line too.

