Okay, if I skip the direct code-errors in this one, just think about it;
$img_info[2] contains '1' (integer, so should really not be quoted). So,
if 1 is not equal to 1 OR 1 is not equal to 2 then give an error.
Wich basically results in that ANY given number will give an error;
if 2 is not equal to 1 OR 2 is not equal to 2 -> error
if 100 is not equal to 1 OR 100 is not equal to 2 -> error
.. and so forth.
Lets do a minor change (using != instead of 'not equal to');
if 1 != 1 AND 1 != 2 -> no error
if 2 != 1 AND 2 != 2 -> no error
if 100 != 1 AND 100 != 2 -> error
if 32 != 1 AND 32 != 2 -> error
A logical 'AND' is expressed as '&&' (without quotes) in PHP. So;
if (1 != 1 && 1 != 2) { error(); } else { noerror(); }
Now, use your own head. Hope it helped ;p