开发者

Forms Help Password and Confirm Password

Thanks for all your help in my previous questions. I have yet anothe开发者_如何学Pythonr question that I needed help with.

I have developed a form and have two fields called password and confirm password. How do i make sure that Password and confirm password are equal? If they aren't I need to display a message.

Thank You

@richsage - Thanks. I will from now on.

Thank you everyone..


Parameters to a PHP script are always strings, so you can use the equality operator (==) to check if the two parameters have the same value.


<?php

if ($_GET["password"] != $_GET["confirm_password"]){
  echo "Passwords must match";
}else {
  // do something
}


Use strcasecmp() or strncasecmp() function

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜