Re: password why?
| From: | _lallous | Date: | Tue, 04 Sep 2001 09:46:30 +0000 |
| Subject: | Re: password why? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-65858@lists.php.net to get a copy of this message | ||
I didn't look very well at your script,
but it seems that you're calling mysql_numrows() instead of mysql_num_rows()
"Gary" <gbland@worldnet.att.net> wrote in message
news:3B943E3B.9080506@worldnet.att.net...
> 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
>