login check
| From: | sub at pudlz dot com | Date: | Fri, 05 Aug 2005 06:42:54 +0000 |
| Subject: | login check | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-220045@lists.php.net to get a copy of this message | ||
I think this is the way I need to write my if statement.
if ( $min && $user[ "min" ] == $min && $user[ "pin" ] == $pin ||
$pin == 'allow')
$min login name entered by the customer at the form.
$user[min] is the login name from my sql db that matches $min
$user[pin] is the password from mysql db that matches $min
$pin is the password that is entered by the user
There's 4 checks
1) $min must have a value
2) $user[ "min" ] must equal $min
3) $user[ "pin" ] must equal $pin
4) $pin == 'allow'
I want it so that both 1 and 2 must be true and either 3 or 4 must be true. Will this if statement
work?
Andrew Darrow
Kronos1 Productions
www.pudlz.com