Verify method returns true
<p>I am trying to verify whether the method in my class is returning a true value. Please look at my object below the class and tell me if it is a valid statement. I am using this to verify whether an email address already exists in the database.</p>

<p>My class and it's constructor </p>

<pre><code>class CheckEmail {

public function __construct($email) {

$db = Database::GetHandler();

    $sql = "SELECT email from users WHERE email='$email'";
    $stmt = $db-&gt;prepare($sql);
    $stmt-&gt;execute();
    $rows = $stmt-&gt;rowCount();

    if($rows &gt; 0) {

        return true;

    } else {

        return false;
    }
}

}
</code></pre>

<p>My object from this class:</p>

<pre><code>if($checkEmail = new CheckEmail($_POST[email])==true) {...
</code></pre>
