checking password character length in php
<p>I am trying to check the password length a user enters in a registration form.
but I am getting an unexpected output.Here is my script.</p>

<pre><code> &lt;?php
 if($_SERVER['REQUEST_METHOD'] == 'POST') 
  {

  if(strlen(trim($password)) &gt; 8)
   {
   echo"Password must be 8characters";
   }
   }
 ?&gt;
</code></pre>
