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; } Link to comment https://forums.phpfreaks.com/topic/122940-solved-check-this-coding/ 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? Link to comment https://forums.phpfreaks.com/topic/122940-solved-check-this-coding/#findComment-634932 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; Link to comment https://forums.phpfreaks.com/topic/122940-solved-check-this-coding/#findComment-634933 Share on other sites More sharing options...
acctman Posted September 5, 2008 Author Share Posted September 5, 2008 thanks Link to comment https://forums.phpfreaks.com/topic/122940-solved-check-this-coding/#findComment-634957 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.