A comprehensive web application for managing animal rescue operations, built with PHP, MySQL, HTML, CSS, and JavaScript.
- User Management: Register and manage users who need rescue services
- Rescuer Management: Register and manage volunteer rescuers
- Rescue Requests: Create, track, and manage animal rescue requests
- Assignment System: Assign rescuers to rescue requests with business logic
- Print System: Generate printable slips for users and receipts for rescuers
- Search Functionality: Find users by phone number
- Reports & Analytics: View system statistics and reports
- Image Upload: Upload and manage pet photos with validation
- Responsive Design: Works on desktop and mobile devices
- Backend: PHP 7.4+ with PDO
- Database: MySQL 5.7+
- Frontend: HTML5, CSS3, JavaScript (ES6+)
- Web Server: Apache (via XAMPP)
- Image Handling: PHP file upload with validation
- XAMPP (Apache + MySQL + PHP)
- PHP 7.4 or higher
- MySQL 5.7 or higher
- Web browser (Chrome, Firefox, Safari, Edge)
- Download and install XAMPP
- Start Apache and MySQL services from XAMPP Control Panel
- Open phpMyAdmin (http://localhost/phpmyadmin)
- Import the database schema:
- Click "Import" tab
- Choose file:
database/schema.sql - Click "Go" to execute
Alternatively, you can run the SQL commands manually:
-- Copy and paste the content from database/schema.sqlEdit includes/config.php if needed to match your MySQL settings:
private $host = 'localhost';
private $db_name = 'animal_rescue_db';
private $username = 'root';
private $password = '';Ensure the web server can write to the uploads directory:
- Create
uploads/directory if it doesn't exist - Set appropriate permissions (755 or 777 for development)
Open your web browser and navigate to:
http://localhost/ANA
ANA/
βββ css/
β βββ styles.css # Main stylesheet
βββ js/
β βββ script.js # JavaScript functionality
βββ includes/
β βββ config.php # Database configuration
β βββ header.php # Common header template
β βββ footer.php # Common footer template
βββ api/
β βββ register-user.php # User registration endpoint
β βββ register-rescuer.php # Rescuer registration endpoint
β βββ create-rescue-request.php # Create rescue request
β βββ search-user.php # User search endpoint
β βββ assign-rescuer.php # Rescuer assignment
β βββ ... # Other API endpoints
βββ database/
β βββ schema.sql # Database schema with sample data
βββ uploads/ # Image upload directory
βββ index.php # Homepage
βββ register-user.php # User registration page
βββ register-rescuer.php # Rescuer registration page
βββ new-rescue-request.php # Create rescue request page
βββ pet-history.php # Rescue history page
βββ users.php # User management page
βββ rescuers.php # Rescuer management page
βββ search.php # User search page
βββ reports.php # Reports and analytics
βββ view-request.php # Request details page
βββ print-slip.php # User slip printing
βββ print-receipt.php # Rescuer receipt printing
βββ README.md # This file
- Automatic generation of unique user codes (PT_USER00001, PT_USER00002, etc.)
- Zero-padded 5-digit sequential numbering
- Required for creating rescue requests
- Rescuers can only be assigned to the user's LATEST pending request
- Once assigned and approved, requests cannot be reassigned
- Maintains request history for tracking
- Supports JPG, PNG, GIF formats
- Maximum file size: 5MB
- Server-side validation and error handling
- Automatic file cleanup on errors
- User slips: Contains user info, rescuer details, and pet information
- Rescuer receipts: Detailed assignment information with priority levels
- Print-optimized CSS styles
- User Registration: Only name and phone required
- Unique Phone Numbers: Each user must have a unique phone number
- User Code Format: PT_USER + 5-digit number (PT_USER00001)
- Latest Request Assignment: System assigns rescuers to user's most recent pending request
- Single Assignment: Once assigned and approved, requests cannot be reassigned
- Pet Conditions: Exactly three options (Normal, Moderate, Serious)
- Request Status Flow: Pending β Assigned β Approved β Completed
- Responsive Design: Mobile-first approach with breakpoints
- Sticky Navigation: Fixed header with smooth navigation
- Modern Cards: Clean card-based layout with shadows
- Status Badges: Color-coded status indicators
- Loading States: Visual feedback during form submissions
- Modal Dialogs: Interactive assignment and confirmation modals
- Print Styles: Optimized layouts for printing
- SQL Injection Prevention: Prepared statements for all database queries
- Input Sanitization: Server-side validation and sanitization
- File Upload Security: Type and size validation for images
- Session Management: PHP sessions for state management
-
Database Connection Error
- Check XAMPP MySQL service is running
- Verify database credentials in
config.php - Ensure database
animal_rescue_dbexists
-
Image Upload Issues
- Check
uploads/directory exists and is writable - Verify PHP file upload settings in
php.ini - Ensure file size is under 5MB
- Check
-
Navigation Issues
- Clear browser cache
- Check Apache rewrite rules
- Verify file paths are correct
Enable debug mode by setting in config.php:
error_reporting(E_ALL);
ini_set('display_errors', 1);Developer: Anamika Sarker Keya
ID: 23203128
The system includes sample data:
- 3 sample users with user codes
- 2 sample rescuers
- 4 sample rescue requests in various states
- Email notifications for assignments
- SMS integration for urgent requests
- Advanced filtering and search
- Export to CSV/PDF reports
- Multi-language support
- Mobile app companion
Note: This system is designed for educational purposes and local deployment. For production use, additional security measures should be implemented.