$lastip=mysql_result($sub, '0','lastip'); if(!empty($lastip) && (strpos($mip[0], $lastip) !== FALSE)