A web-based pet adoption management system that demonstrates the integration of HTML, CSS, PHP, and MySQL. This project is designed as a learning exercise for web development students.
By completing this project, students will learn to:
- Design responsive web interfaces using HTML and CSS
- Implement database operations with PHP and MySQL
- Handle file uploads and form validation
- Create an interactive web application
- Apply modern UI/UX principles
- Create MySQL database for pet data
- Design table structure with appropriate fields
- Set up proper data types and constraints
- Create user-friendly pet submission form
- Implement responsive design
- Style elements using CSS
- Add form validation
- Handle form submissions with PHP
- Manage file uploads
- Implement database operations
- Display pet listings
- XAMPP (Apache and MySQL)
- Text editor (VS Code recommended)
- Web browser
- Basic knowledge of:
- HTML/CSS
- PHP
- MySQL
- Form handling
- Set up XAMPP:
# Start Apache and MySQL services
- Create project directory:
# Navigate to htdocs folder
cd /xampp/htdocs
# Create project folder
mkdir pet-adoption
- Set up database:
# Import database structure
mysql -u root -p < pet_adoption.sql
- Configure permissions:
# Create and set permissions for uploads folder
mkdir uploads
chmod 777 uploads
Mini_Project_Pet_Adoption_COM-2204/
├── index.html # Pet submission form
├── style.css # CSS styles
├── insert_pet.php # Form processing
├── view_pets.php # Pet listing page
├── pet_adoption.sql # Database structure
└── uploads/ # Image storage
CREATE DATABASE pet_adoption;
USE pet_adoption;
CREATE TABLE pets (
id INT AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(50),
type VARCHAR(50),
age INT,
description TEXT,
image_path VARCHAR(255)
);
- Create pet submission form
- Add input validation
- Style with CSS
- Implement file upload
- Validate form inputs
- Handle image uploads
- Insert data into database
- Display success/error messages
- Database Connection
- Database creates successfully
- Table structure is correct
- Connections work properly
- Form Functionality
- All inputs work correctly
- File upload functions
- Validation works
- Error messages display
- Display Features
- Pets list shows correctly
- Images display properly
- Layout is responsive
- Database Connection
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
- File Upload Issues
// Verify upload directory permissions
if (!is_writable('uploads/')) {
die("Upload directory is not writable");
}
- Zip your project files:
Mini_Project_Pet_Adoption.zip
├── index.html
├── style.css
├── insert_pet.php
├── view_pets.php
└── pet_adoption.sql
- Submit Requirements:
- Working source code
- Database export
- Brief documentation
- Testing results
- Database Design (20%)
- User Interface (25%)
- Functionality (30%)
- Code Quality (15%)
- Documentation (10%)
Created for Web Development Lab Assignment