Using AND makes it complicated. You would need a condition like
!(!stristr($A,'Erorr Email') && !stristr($A,'Erorr Password'))
. Use stristr($A,'Erorr Email') || stristr($A,'Erorr Password')
instead.