ciao,

ho dato solo un occhiata veloce e ho notato questo:

elseif ($cercamsg & $cercamsg2)