php - Server-side form validation weird error -


i have following php code form processing :

$post = cleanpost($_post, $db->link);  echo strlen($post['login']).' -- '.strlen($post['pass']); // debug  if ((strlen($post['login']) < 3) || (strlen($post['pass'] < 7))) {     $page = new page("subscribe");     $page->assign("msg", "at least 3 characters login , 7 characters password"); } 

the form filters stated cases (less 3 chars login , less 7 chars password) filtered when should pass : tried register "asdf" // "asdfasdf" , still message. can see, have echoed strlens, 4 , 8. i'm totally stuck here

if ((strlen($post['login']) < 3) || (strlen($post['pass'] < 7))) 

should be:

if ((strlen($post['login']) < 3) || (strlen($post['pass']) < 7)) 

Comments

Popular posts from this blog

yii2 - Yii 2 Running a Cron in the basic template -

asp.net - 'System.Web.HttpContext' does not contain a definition for 'GetOwinContext' Mystery -

mercurial graft feature, can it copy? -