Re: problem using &&
| From: | Sameer N Ingole | Date: | Wed, 26 Jul 2006 11:25:43 +0000 |
| Subject: | Re: problem using && | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-239794@lists.php.net to get a copy of this message | ||
php@redry.net wrote:
if( $out[0][0] == $u && $out[0][1] == $p ) { $error = "Login successful!"; } else { $error = "Invalid username/password. Try again"; }
If I just test if( $out[0][1] == $u ) it works. If statement above works then $out[0][1] contains user name but in code snippetif( $out[0][0] == $u && $out[0][1] == $p ) { you are testing it against $p which I guess is password.. -- Sameer N. Ingole weblogic.noroot.org/gallery2/v/travel/lonar/ --- Better to light one candle than to curse the darkness.