just to exapand a bit on madwormer2's post:
you are asking PHP to evaluate 2 distinct statements:
1. if $value != '1' equals boolean TRUE
2. if '2' equals boolean TRUE
you are saying to conditionally excute code if either one is true (by using the || operator). the 1st statement may or may not be true. the second one will always be true, hence, the code will always be excecuted.
if suspect what you probably want is this:
if ($value != '1' && $value != '2')
{
// do something is $value is neither 1 nor 2
}