There are two variables in one of them the value of the "password" field in the other "repeat password" ... And how can they be compared for a match?

    4 answers 4

    You need to compare either:

    strcmp(str1,str2) 

    or

     if( $str1 === $str2 ) ... //(это не опечатка, а 3 равно) 

    for

     var_dump("044" == "44"); //выведет bool(true) 
       $string1 = "Hello"; $string2 = "World"; if ($string1 == $string2){ print "Переменные равны"; } else { print "Переменные не равны"; } 
      • try to compare in this way "0e42" and "0e123" , for example - mymedia

      yes though:

       if ($password == $confirm) 

      or so:

      http://ru2.php.net/manual/en/function.strcmp.php

         strcmp(str1,str2) 

        Read more: http://php.su/functions/?strcmp