Complete Step-by-Step PHP Project with Source Code
π Sample PHP Code Snippets
π db.php (Database Connection)
<?php
$host = 'localhost'; $user = 'root'; $pass = ''; $dbname = 'resume_db';
$conn = new mysqli($host, $user, $pass, $dbname); if ($conn->connect_error) { die("Connection failed: " . $conn->connect_error); } ?>
π insert_resume.php (Insert Resume Data)
<?php
session_start(); include 'db.php';
if ($_SERVER['REQUEST_METHOD'] == 'POST') { $name = $_POST['name']; $email = $_POST['email']; $phone = $_POST['phone']; $education = $_POST['education']; $experience = $_POST['experience']; $skills = $_POST['skills']; $user_id = $_SESSION['user_id'];
$stmt = $conn->prepare("INSERT INTO resumes (user_id, name, email, phone, education, experience, skills) VALUES (?, ?, ?, ?, ?, ?, ?)");
$stmt->bind_param("issssss", $user_id, $name, $email, $phone, $education, $experience, $skills);
$stmt->execute();
header("Location: preview_resume.php?id=" . $conn->insert_id);
exit;
} ?>
π€ send_whatsapp.php (Send Resume via WhatsApp)
<?php
$resume_path = 'resumes/resume123.pdf'; $instance_id = 'your_instance_id'; $token = 'your_token'; $phone = '+919123456789';
$url = "https://api.ultramsg.com/$instance_id/messages/document"; $data = [ 'token' => $token, 'to' => $phone, 'filename' => 'My_Resume.pdf', 'document' => "https://yourdomain.com/$resume_path", 'caption' => 'Here is your generated resume.' ];
$curl = curl_init(); curl_setopt_array($curl, [ CURLOPT_URL => $url, CURLOPT_RETURNTRANSFER => true, CURLOPT_POST => true, CURLOPT_POSTFIELDS => http_build_query($data) ]); $response = curl_exec($curl); curl_close($curl); echo $response; ?>
π Full Project Overview
This project is a powerful AI Resume Builder built using PHP and MySQL. It allows users to register, create professional resumes, export them as PDF, and even send them via WhatsApp using the UltraMsg API.
π Technologies Used
- PHP 8+
- MySQL Database
- Bootstrap 5 (Responsive Design)
- DOMPDF (PDF Generation)
- UltraMsg WhatsApp API
π Project Structure
/resume_builder/
βββ index.php βββ register.php βββ dashboard.php βββ create_resume.php βββ preview_resume.php βββ generate_pdf.php βββ send_whatsapp.php βββ admin_view.php βββ db.php βββ resumes/ βββ templates/ βββ assets/
π¨βπΌ User Features
- User registration and login
- Form to enter resume details (name, email, phone, education, experience, skills)
- Preview resume in browser
- Generate PDF instantly
- Send resume PDF to WhatsApp (via UltraMsg)
π¨βπΌ Admin Features
- View all usersβ resumes
- Preview or download any resume
π€ WhatsApp Integration
We used UltraMsg to send PDF resumes via WhatsApp. It requires:
- Instance ID
- Token
- User’s WhatsApp number in international format
The PDF is sent as a document with a custom caption.
π PDF Resume Generator
The system uses the DOMPDF library to render HTML-based resumes into PDF format on the fly. You can add templates using the templates/
folder.
π Ideal For
- Diploma or B.Tech final year projects
- Freelancers offering resume builder services
- Educational portfolio or web tools
π¦ Extra Features (Optional)
- Multiple Resume Templates
- Dark Mode Support
- Auto-fill with AI (GPT integration)
- Download Logs / Resume History
π¬ Final Thoughts
This AI Resume Builder project is both practical and feature-rich. It teaches core PHP, MySQL, PDF creation, API integration, and more. Suitable for job seekers, students, and PHP learners.
Project created by Dipesh Jamsudkar | 2025