acctman Posted September 5, 2008 Share Posted September 5, 2008 does this look right... I haven't processed it yet since it part of a biggere piece of coding, but does everything look right? if ($_POST['add_type']==1 && $_POST['add_rateme']==OFF) { $rateme=1; } else { $rateme=3; } Quote Link to comment Share on other sites More sharing options...
MatthewJ Posted September 5, 2008 Share Posted September 5, 2008 Everything except ==OFF I have never seen OFF used in that respect, not saying it is wrong, but maybe ==FALSE instead? Quote Link to comment Share on other sites More sharing options...
Psycho Posted September 5, 2008 Share Posted September 5, 2008 Well OFF is fine if it has been defined as a constant. But, assuming that OFF is correct, there is an easier way to accomplish that: $rateme = ($_POST['add_type']==1 && $_POST['add_rateme']==OFF) ? 1 : 3; Quote Link to comment Share on other sites More sharing options...
acctman Posted September 5, 2008 Author Share Posted September 5, 2008 thanks 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.