Having problems with "if" ststements. Not following the condition

NO
if(rh = 1) {

YES
if(rh == 1) {

= is for equality
== is for comparison