The facial recognition system can be applied to attendance in schools, colleges and offices. This system is designed to build a classroom attendance system based on facial recognition technology to replace the manual attendance system, which is time-consuming and difficult to manage. The system includes four main stages: database building, face detection, face recognition, and attendance update. The database is created from images of students in the classroom. Face detection and recognition are performed using the Haar-Cascade classifier and the Local Binary Pattern Histogram (LBPH) algorithm, respectively. Faces are detected and recognized from live classroom video. Attendance results will be sent via email to the instructor in charge at the end of the class.