Re: problem using &&

From: 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 snippet
if( $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.

« previous php.general (#239794) next »