A comprehensive web-based attendance monitoring system for colleges and universities built with PHP, MySQL, HTML, CSS, and JavaScript.
- User Authentication: Secure login system with role-based access (Admin, Teacher, Student)
- Student Management: Add, edit, delete, and view student information
- Course Management: Manage courses with teacher assignments
- Attendance Tracking: Mark and track student attendance with different statuses (Present, Absent, Late)
- Reports & Analytics: Generate detailed attendance reports with statistics
- Dashboard: Overview of key metrics and recent activity
- Responsive Design: Works on desktop and mobile devices
- PHP 7.4 or higher
- MySQL 5.7 or higher
- Apache web server (recommended with XAMPP for local development)
- Web browser
Place all files in your web server's document root directory (e.g., htdocs for XAMPP).
-
Create a new MySQL database named
attendance_system -
Import the database schema by running the SQL commands in
database_schema.sqlUsing phpMyAdmin:
- Open phpMyAdmin
- Select your database
- Go to the "SQL" tab
- Copy and paste the contents of
database_schema.sql - Click "Go"
Using MySQL Command Line:
mysql -u username -p attendance_system < database_schema.sql
Update the database connection settings in includes/db_connect.php if needed:
define('DB_HOST', 'localhost');
define('DB_USER', 'your_username');
define('DB_PASS', 'your_password');
define('DB_NAME', 'attendance_system');Make sure your web server is configured to serve PHP files. For XAMPP:
- Start Apache and MySQL services
- Place the project files in
C:\xampp\htdocs\attendance_system\ - Access the application at
http://localhost/attendance_system/
- Username: admin
- Password: admin123
- Role: Administrator
- Access the application in your web browser
- Log in with the default admin credentials
- Add teachers, students, and courses through the admin panel
- Start marking attendance
- Administrator: Full access to all features including user management
- Teacher: Can manage their assigned courses and mark attendance
- Student: Can view their own attendance records
- Dashboard: View system statistics and recent attendance
- Students: Manage student information and enrollment
- Courses: Create and manage courses with teacher assignments
- Attendance: Mark daily attendance for students
- Reports: Generate attendance reports with filtering options
attendance_system/
├── index.php # Main entry point
├── login.php # Login page
├── logout.php # Logout handler
├── dashboard.php # Main dashboard
├── students.php # Student management
├── courses.php # Course management
├── attendance.php # Attendance marking
├── reports.php # Attendance reports
├── database_schema.sql # Database schema
├── README.md # This file
├── includes/
│ ├── db_connect.php # Database connection
│ ├── session_check.php # Session validation
│ └── header.php # Navigation header
├── css/
│ └── style.css # Main stylesheet
└── js/
└── main.js # JavaScript functionality
- Password hashing using PHP's
password_hash() - Prepared statements to prevent SQL injection
- Session-based authentication
- Input validation and sanitization
- Role-based access control
- Chrome 70+
- Firefox 65+
- Safari 12+
- Edge 79+
-
Database Connection Error
- Check database credentials in
includes/db_connect.php - Ensure MySQL service is running
- Verify database name exists
- Check database credentials in
-
Page Not Loading
- Check PHP installation and version
- Ensure Apache is running
- Verify file permissions
-
Login Issues
- Confirm default admin user exists in database
- Check password (default: admin123)
- Clear browser cache and cookies
Check your web server's error logs for detailed error information:
- XAMPP:
xampp\apache\logs\error.log - Apache:
/var/log/apache2/error.log
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
This project is open source and available under the MIT License.
For support or questions, please check the troubleshooting section or create an issue in the repository.
Note: This system is designed for educational purposes. For production use, additional security measures and testing should be implemented.