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 Link to comment https://forums.phpfreaks.com/topic/58286-solved-if-question/ 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) Link to comment https://forums.phpfreaks.com/topic/58286-solved-if-question/#findComment-288997 Share on other sites More sharing options...
johnwayne77 Posted July 3, 2007 Author Share Posted July 3, 2007 great~ thanks dude! Link to comment https://forums.phpfreaks.com/topic/58286-solved-if-question/#findComment-288999 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.