I didn't look very well at your script,
but it seems that you're calling mysql_numrows() instead of mysql_num_rows()

"Gary" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> 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
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to