password why?

From: Date: Tue, 04 Sep 2001 02:36:43 +0000
Subject: password why?
Groups: php.general 
Request: Send a blank email to php-general+get-65822@lists.php.net to get a copy of this message
Hello Everybody, I have a script that checks if the password and password confirm are the same on a sign up page. It seems that if the password is already in the db it prints out passwords do not match like the password and confirm do not match. Why? //check if passwords match if ($password != $pass_check) { echo "<center><h3>Password's don't match!<br>Please use your back button and fix the error</h3></center>"; } else { // Connect To The Database $db = mysql_connect("localhost","user","password") or die ("couldn't connect to server"); mysql_select_db("dbname",$db) or die ("couldn't select database"); //Find Out If They Are Already In The System $sql = "SELECT name,email FROM tablename WHERE
     name='$name' OR email='$email'";
        $result=mysql_query($sql);
        $num=mysql_numrows($result);
        if ($num > 0)
            echo "<center><h3>Your Username is already taken.<br>Please use your back button and choose another</h3></center>";
       else {
more code TIA Gary

« previous php.general (#65822) next »