if ($id == preg_match($friend,$id) ) { $x = random(3); if ($x = 1) { $capcha = md5("xxxxxx"); .... } }