johnwayne77 Posted July 3, 2007 Share Posted July 3, 2007 how can i put 2 conditions in one IF command? something like this: else { if($row['cnp'] == $_cnp || $row['parola'] == $_parola) <--- { $_SESSION['logged'] = "agk8gjf38834j2"; $_SESSION['user'] = $_utilizator; I don't think the || works as the app is not checking both fields.. Any ideas? thanks Quote Link to comment Share on other sites More sharing options...
pocobueno1388 Posted July 3, 2007 Share Posted July 3, 2007 If you wanting it to check both fields you need to use the && operator. if($row['cnp'] == $_cnp && $row['parola'] == $_parola) Quote Link to comment Share on other sites More sharing options...
johnwayne77 Posted July 3, 2007 Author Share Posted July 3, 2007 great~ thanks dude! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.