Why is it not detecting a capital letter in php : <p>this is someone else's code and seems to work for everyone online but me. 
It doesn't seem to detect the capital letters even though i have dedicated code for it. </p>

<p>Could someone spot the error in my code:</p>

<pre><code>&lt;?php

if($_POST['submit']){


    if(!$_POST['email']) $error.="&lt;br /&gt;Please enter your email";
        else if (!filter_var($_POST['email'], FILTER_VALIDATE_EMAIL)) $error.="&lt;br /&gt;Please enter a valid mail";

    if(!$_POST['password']) $error.="&lt;br /&gt;Please enter your password";
    else {

            if(strlen($_POST['password'])&lt;8) $error.="&lt;br /&gt;Please enter a password with atleast 8 characters";
            if(!preg_match('/[A-Z]/', $_post['password'])) $error.="&lt;br /&gt;Please enter atleast one capital letter";
        }

        if($error) echo "There were error(s) in your details:".$error;

    }   

?&gt;




&lt;form method="post"&gt;

        &lt;input type="email" name="email" id="email" /&gt;
        &lt;input type="password" name="password" /&gt;
        &lt;input type="submit" name="submit" value="signup" /&gt;

&lt;/form&gt;
</code></pre>

<p>Here is the link to it: </p>

<p><a href="http://hassannasir.co.uk/mysql/" rel="nofollow">http://hassannasir.co.uk/mysql/</a></p>
