Optimized code for find person php app (reviewed by udit).