CareerConnect is a comprehensive PHP-based job application portal that enables job seekers to browse and apply for positions while providing administrators with powerful tools to manage job listings and applications through a secure dashboard interface.
- Backend: PHP 8.0+ with PDO for database operations
- Database: MySQL/MariaDB with foreign key constraints
- Frontend: HTML5, CSS3, JavaScript (ES6+)
- Security: Password hashing with PHP's
password_hash(), session management - File Handling: Secure resume upload with validation
- UI Framework: Font Awesome icons, responsive CSS Grid/Flexbox
- Job Browsing: View all open job listings with pagination
- Advanced Search: Filter jobs by title, location, skills, and salary range
- Job Details: Comprehensive job information including requirements and deadlines
- Application System: Apply to jobs with resume upload (PDF support)
- Responsive Design: Mobile-first responsive layout
- Real-time Stats: Dashboard showing total jobs and applications
- Secure Authentication: Login/logout system with session management
- Dashboard Analytics: Real-time statistics for jobs and applications
- Job Management: Create, edit, delete, and toggle job status (open/closed)
- Application Management: View all applicants with detailed information
- Resume Downloads: Direct download of applicant resumes
- Status Management: Approve, reject, or keep applications pending
- CSV Export: Export application data for external analysis
- Bulk Operations: Manage multiple jobs and applications efficiently
job-portal/
βββ admin/ # Admin frontend interface
β βββ dashboard.html # Main admin dashboard
β βββ login.html # Admin login page
β βββ js/
β βββ admin.js # Admin panel JavaScript
βββ admin_api/ # Admin backend APIs
β βββ auth_check.php # Authentication verification
β βββ create_job.php # Job creation endpoint
β βββ delete_job.php # Job deletion endpoint
β βββ export_applicants.php # CSV export functionality
β βββ get_applicants.php # Fetch applications data
β βββ get_job.php # Single job retrieval
β βββ get_jobs.php # Jobs listing for admin
β βββ login.php # Admin login handler
β βββ logout.php # Session termination
β βββ toggle_status.php # Job status toggle
β βββ update_application_status.php # Application status updates
β βββ update_job.php # Job modification endpoint
βββ backend/ # Public-facing APIs
β βββ apply.php # Job application submission
β βββ get_job.php # Public job details
β βββ get_jobs.php # Public jobs listing
βββ includes/ # Configuration and utilities
β βββ config.php # Application configuration
β βββ db.php # Database connection setup
βββ public/ # Public frontend
β βββ css/
β β βββ style.css # Main stylesheet
β βββ js/
β β βββ app.js # Public-side JavaScript
β βββ index.html # Homepage
β βββ job_detail.html # Job details page
βββ uploads/ # File storage
β βββ resumes/ # Resume uploads directory
βββ database.sql # Database schema and sample data
βββ README.md # Project documentation
The application uses three main tables with proper relationships:
-
admins- Administrator accountsid(Primary Key)username(Unique)password(Hashed withpassword_hash())
-
jobs- Job listingsid(Primary Key)title,description,location,skillssalary(Decimal),deadline(Date)status(ENUM: 'open', 'closed')created_at(Timestamp)
-
applications- Job applicationsid(Primary Key)job_id(Foreign Key β jobs.id)full_name,email,phoneresume(File path)applied_at(Timestamp)status(ENUM: 'pending', 'approved', 'rejected')- Unique constraint on (
job_id,email)
- PHP: 8.0+ (recommended) or 7.4+ (minimum)
- MySQL: 5.7+ or MariaDB 10.3+
- Apache: 2.4+ with mod_rewrite enabled
- PHP Extensions: PDO, PDO_MySQL, fileinfo, session
- Disk Space: 100MB+ for uploads
- Memory: 128MB+ PHP memory limit
- XAMPP: 8.0+ (includes Apache, MySQL, PHP)
- Alternative: WAMP, MAMP, or Docker with LAMP stack
- Browser: Modern browser with JavaScript enabled
- Internet: Required for Font Awesome CDN
Option A: Using XAMPP
# Download and install XAMPP from https://www.apachefriends.org/
# Start Apache and MySQL servicesOption B: Manual Setup
# Ensure Apache, MySQL, and PHP are installed and configured
sudo systemctl start apache2
sudo systemctl start mysql# Clone the repository
git clone https://github.com/yourname/job-portal.git
# Or download and extract to your web server directory
# For XAMPP: C:\xampp\htdocs\job-portal
# For Linux: /var/www/html/job-portalStep 1: Create Database
-- Via phpMyAdmin or MySQL CLI
CREATE DATABASE job_portal CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;Step 2: Import Schema
# Via phpMyAdmin: Import database.sql file
# Or via MySQL CLI:
mysql -u root -p job_portal < database.sqlStep 3: Verify Tables
USE job_portal;
SHOW TABLES;
-- Should show: admins, applications, jobsUpdate configuration files with your environment settings:
includes/config.php
<?php
define('DB_HOST', 'localhost');
define('DB_NAME', 'job_portal');
define('DB_USER', 'root'); // Your MySQL username
define('DB_PASS', ''); // Your MySQL password
define('UPLOAD_PATH', __DIR__ . '/../uploads/resumes/');
?># Set proper permissions for upload directory
chmod 755 uploads/
chmod 755 uploads/resumes/
# For Linux/Mac, ensure web server can write
sudo chown -R www-data:www-data uploads/- Public Site:
http://localhost/job-portal/public/ - Admin Panel:
http://localhost/job-portal/admin/login.html
The database includes a pre-configured admin account:
- Username:
admin - Password:
admin123(hashed withpassword_hash())
-- Add new admin (password will be hashed automatically by the application)
INSERT INTO admins (username, password)
VALUES ('newadmin', '$2y$10$OEWlg5spFKHpuhdPDN9E3e4/jyF01DDSA2BAGHEnVy1bU56U9pgBm');- Password Hashing: Uses PHP's
password_hash()with bcrypt - Session Management: Secure session handling with regeneration
- File Upload Security:
- File type validation (PDF only for resumes)
- File size limits
- Secure file naming to prevent conflicts
- SQL Injection Protection: All queries use prepared statements
- XSS Prevention: Input sanitization and output escaping
GET /backend/get_jobs.php
Response: JSON array of open jobs
GET /backend/get_job.php?id={job_id}
Response: JSON object with job details
POST /backend/apply.php
Form Data: job_id, full_name, email, phone, resume (file)
Response: JSON success/error message
GET /admin_api/auth_check.php
Response: {"authenticated": boolean}
GET /admin_api/get_jobs.php
Response: JSON array of all jobs with status
POST /admin_api/create_job.php
Form Data: title, description, location, skills, salary, deadline
Response: JSON success/error message
POST /admin_api/update_job.php
Form Data: id, title, description, location, skills, salary, deadline
Response: JSON success/error message
GET /admin_api/get_applicants.php
Response: JSON array of all applications with job details
POST /admin_api/update_application_status.php
Form Data: id, status (pending/approved/rejected)
Response: JSON success/error message
GET /admin_api/export_applicants.php
Response: CSV file download
- Web Server: Apache 2.4+ or Nginx 1.18+
- PHP: 8.0+ with required extensions
- Database: MySQL 8.0+ or MariaDB 10.5+
- SSL Certificate: Recommended for production
- Backup Strategy: Regular database and file backups
- Server Setup
# Update server packages
sudo apt update && sudo apt upgrade
# Install LAMP stack
sudo apt install apache2 mysql-server php8.0 php8.0-mysql php8.0-mbstring- Security Configuration
# Secure MySQL installation
sudo mysql_secure_installation
# Configure firewall
sudo ufw allow 80
sudo ufw allow 443
sudo ufw enable- Application Deployment
# Upload files to web directory
# Update config.php with production database credentials
# Set proper file permissions
sudo chown -R www-data:www-data /var/www/html/job-portal
sudo chmod -R 755 /var/www/html/job-portal
sudo chmod -R 775 /var/www/html/job-portal/uploads- SSL Setup (Recommended)
# Using Let's Encrypt
sudo apt install certbot python3-certbot-apache
sudo certbot --apache -d yourdomain.comError: Database connection failed: SQLSTATE[HY000] [1045] Access denied
Solution: Check database credentials in includes/config.php
Error: Failed to upload resume
Solutions:
- Check upload directory permissions (755 or 775)
- Verify PHP upload_max_filesize setting
- Ensure file is PDF format and under size limit
Error: Invalid credentials
Solutions:
- Verify admin account exists in database
- Check password hash in database
- Clear browser cache and cookies
Error: Session expired or authentication failed
Solutions:
- Check PHP session configuration
- Verify session directory permissions
- Clear browser cookies
Enable error reporting for development:
// Add to top of PHP files for debugging
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);Check server logs for detailed error information:
# Apache error log
tail -f /var/log/apache2/error.log
# PHP error log
tail -f /var/log/php/error.log-
Code Standards
- Follow PSR-12 coding standards for PHP
- Use meaningful variable and function names
- Comment complex logic and algorithms
- Maintain consistent indentation (2 spaces)
-
Security Practices
- Always use prepared statements for database queries
- Validate and sanitize all user inputs
- Implement proper error handling
- Use HTTPS in production
-
Testing
- Test all functionality before submitting changes
- Verify cross-browser compatibility
- Test file upload functionality
- Validate responsive design on mobile devices
- Fork the repository
- Create a feature branch (
git checkout -b feature/new-feature) - Make your changes with proper documentation
- Test thoroughly in local environment
- Commit changes (
git commit -am 'Add new feature') - Push to branch (
git push origin feature/new-feature) - Create a Pull Request with detailed description
When reporting bugs, please include:
- PHP version and server environment
- Browser and version
- Steps to reproduce the issue
- Error messages or screenshots
- Expected vs actual behavior
This project is licensed under the MIT License - see the LICENSE file for details.
Educational Use: This project is designed for learning purposes and portfolio demonstration. Feel free to use, modify, and distribute according to the license terms.
Built with β€οΈ by Shubham Patra