Appointment Booking System - Complete Documentation

This documentation explains how to install, configure, and customize the Appointment Booking System. It is designed for developers, website owners, and administrators.

Quick Start Guide

Get your appointment booking system up and running in minutes with our streamlined installation process.

1

Upload Files

Extract the ZIP file and upload all files to your web server using FTP or cPanel File Manager. Make sure to upload to your domain's root directory or a subdirectory (e.g. /booking) of your choice.

2

Create Database

Create a MySQL database through your hosting control panel (cPanel, Plesk, etc.). Take note of:

  • Database name
  • Database username
  • Database password
  • Database host (usually localhost)
3

Run Installation Wizard

Navigate to http://yourdomain.com/booking/install.php in your browser and follow the 5-step installation wizard:

  1. Requirements check
  2. Database configuration
  3. Database table creation
  4. Admin account setup
  5. Installation complete
4

Configure Your System

Log into the admin panel and set up your:

  • Business information
  • Services and pricing
  • Working hours
  • Email settings
5

Start Accepting Bookings!

Share your booking page URL with customers and start accepting appointments. The booking page will be at http://yourdomain.com/booking/

Pro Tip

The installation wizard automatically handles all database table creation and initial configuration. The entire process typically takes less than 5 minutes!

System Requirements

Before installing, ensure your server meets these minimum requirements:

Server Requirements

Component Minimum Version Recommended
PHP 8.1 8.1 or higher
MySQL 5.7 8.0 or higher
MariaDB 10.2 10.5 or higher
Web Server Apache 2.4 or Nginx 1.18 Latest stable version

Required PHP Extensions

The following PHP extensions must be enabled:

  • PDO - Database connections
  • PDO_MySQL - MySQL driver
  • mbstring - Multibyte string handling
  • json - JSON encoding/decoding
  • session - Session management
  • date - Date/time functions

File Permissions

The following directories need write permissions (755 or 775):

config.php (after creating from config.example.php) /logs/ (if you plan to enable logging)
Checking Requirements

The installation wizard includes an automatic requirements checker that verifies all necessary components. Any issues will be highlighted before you proceed with installation.

Installation Guide

Follow these detailed steps to install your appointment booking system.

Step 1: Prepare Your Files

1.1 Extract the ZIP Archive

Extract the downloaded ZIP file to your local computer. You should see the following structure:

appointment-booking-system/ ├── admin/ # Admin panel │ ├── index.php # Dashboard │ ├── bookings.php # Booking management │ ├── services.php # Service management │ ├── hours.php # Working hours │ ├── holidays.php # Holiday management │ ├── email-templates.php # Email customization │ ├── payment-settings.php # Payment configuration │ ├── settings.php # General settings │ ├── import-export.php # Data management │ ├── reports.php # Analytics & reports │ ├── change-password.php # Password management │ ├── forgot-password.php # Password reset request │ ├── reset-password.php # Password reset form │ └── includes/ # Header, footer, sidebar ├── assets/ # Static resources │ ├── css/ # Stylesheets │ ├── js/ # JavaScript │ └── images/ # Images ├── includes/ # Core PHP files │ ├── database.php # Database class │ ├── functions.php # Helper functions │ ├── email.php # Email functions │ └── auth.php # Authentication ├── vendor/ # Composer dependencies ├── webhooks/ # Payment webhooks │ ├── stripe.php # Stripe webhook │ └── paypal.php # PayPal webhook ├── widgets/ # Embeddable widgets ├── database/ # Database files │ ├── schema.sql # Complete schema │ └── migrations/ # Update scripts ├── index.php # Customer booking interface ├── config.php # Configuration ├── config.example.php # Config template ├── install.php # Installation wizard ├── composer.json # Dependencies └── .htaccess # URL rewriting

1.2 Upload via FTP

Using an FTP client (FileZilla, Cyberduck, etc.):

  1. Connect to your server using your FTP credentials
  2. Navigate to your public_html or www directory
  3. Upload all files (this may take a few minutes)
  4. Ensure all files have been transferred successfully
Important

Do not rename or modify any files before running the installation wizard. The installer expects specific file names and locations.

Step 2: Create MySQL Database

Using cPanel

  1. Log into your cPanel
  2. Find "MySQL Databases" or "MySQL Database Wizard"
  3. Create a new database (e.g., mydomain_appointments)
  4. Create a new MySQL user with a strong password
  5. Add the user to the database with ALL PRIVILEGES
  6. Note down the database name, username, password, and host

Using phpMyAdmin

  1. Log into phpMyAdmin
  2. Click "New" in the left sidebar
  3. Enter database name
  4. Select "utf8mb4_unicode_ci" as collation
  5. Click "Create"
-- Example SQL command (if you have direct access) CREATE DATABASE appointment_booking CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

Step 3: Run Installation Wizard

Navigate to http://yourdomain.com/booking/install.php, assuming you uploaded files to /booking/ in your web browser.

Installation Step 1: Requirements Check

The wizard will automatically verify:

  • PHP version compatibility
  • Required PHP extensions
  • File permissions
  • Server configuration

Installation Step 2: Database Configuration

Enter your database credentials:

Field Description Example
Database Host Usually localhost localhost
Database Name Your database name mydomain_appointments
Database User MySQL username mydomain_user
Database Password MySQL password ••••••••••

Installation Step 3: Database Tables

The installer will automatically create these tables:

  • admin_users - Admin account storage
  • services - Services and pricing
  • working_hours - Business hours configuration
  • bookings - Customer appointments
  • settings - System settings

Installation Step 4: Admin Account

Create your administrator account:

  • Username - Choose a secure username (not "admin")
  • Email - Your admin email address
  • Password - Strong password (minimum 8 characters)
Security Best Practice

Use a strong, unique password with a mix of uppercase, lowercase, numbers, and special characters. Never use common passwords like "password123" or "admin".

Installation Step 5: Complete

Once installation is complete:

  1. Delete or rename install.php for security
  2. Log into the admin panel at http://yourdomain.com/booking/admin/, assuming you uploaded files to /booking/ in your web browser.
  3. Configure your business settings
  4. Add your services
  5. Set up working hours

Configuration

Configure your appointment booking system to match your business needs.

Configuration File

The main configuration file is config.php, automatically created during installation. Here's what you can customize:

<?php // Database Configuration define('DB_HOST', 'localhost'); define('DB_NAME', 'appointment_booking'); define('DB_USER', 'your_username'); define('DB_PASS', 'your_password'); // Application Settings define('APP_NAME', 'My Business Appointments'); define('APP_URL', 'https://yourdomain.com'); define('TIMEZONE', 'America/New_York'); // Email Configuration define('MAIL_FROM', 'bookings@yourdomain.com'); define('MAIL_FROM_NAME', 'My Business'); define('SEND_MAILS', true); // Session Settings define('SESSION_LIFETIME', 7200); // 2 hours in seconds // Security define('ADMIN_SESSION_TIMEOUT', 1800); // 30 minutes

Timezone Configuration

Set your timezone to ensure correct booking times. Common timezone examples:

  • America/New_York - Eastern Time
  • America/Chicago - Central Time
  • America/Denver - Mountain Time
  • America/Los_Angeles - Pacific Time
  • Europe/London - UK
  • Europe/Paris - Central Europe
  • Asia/Tokyo - Japan
  • Australia/Sydney - Australia
Finding Your Timezone

Visit PHP Timezones for a complete list of supported timezones.

Email Configuration

The system uses PHP's mail() function by default. For better deliverability, you can configure SMTP:

Option 1: PHP mail() (Default)

define('MAIL_METHOD', 'php'); define('SEND_MAILS', true);

Option 2: SMTP Configuration

define('MAIL_METHOD', 'smtp'); define('SMTP_HOST', 'smtp.gmail.com'); define('SMTP_PORT', 587); define('SMTP_SECURE', 'tls'); define('SMTP_USERNAME', 'your-email@gmail.com'); define('SMTP_PASSWORD', 'your-app-password');
Gmail SMTP

If using Gmail, you need to enable "Less secure app access" or generate an App Password if you have 2-factor authentication enabled.

URL Rewriting (.htaccess)

The included .htaccess file enables clean URLs. If you encounter issues:

<IfModule mod_rewrite.c> RewriteEngine On RewriteBase / # Redirect to HTTPS (optional) # RewriteCond %{HTTPS} off # RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] # Protect config file RewriteRule ^config\.php$ - [F,L] </IfModule>

Security Settings

Password Hashing

The system uses bcrypt password hashing (cost factor 10) by default. This is secure and cannot be changed without modifying core files.

Session Security

// Session timeout for admin users (in seconds) define('ADMIN_SESSION_TIMEOUT', 1800); // 30 minutes // Regenerate session ID on login session_regenerate_id(true);

SQL Injection Protection

All database queries use PDO prepared statements with bound parameters, providing automatic protection against SQL injection attacks.

XSS Protection

All user inputs are sanitized and outputs are escaped using the built-in h() function.

Admin Panel Guide

Complete guide to using the administration dashboard.

Accessing the Admin Panel

Log in to your admin panel at:

http://yourdomain.com/booking/admin/

Use the credentials you created during installation.

Security Note

Admin sessions expire after 30 minutes of inactivity. Always log out when finished, especially on shared computers.

Dashboard Overview

The dashboard provides an at-a-glance view of your booking system:

Today's Bookings

View today's schedule

Pending

Awaiting confirmation

Services

Total services offered

This Month

Monthly bookings

Navigation Menu

Section Purpose
Dashboard Overview and statistics
Bookings View and manage all appointments
Services Add, edit, or remove services
Working Hours Configure availability schedule
Settings Business information and email setup

Managing Services

Add and configure the services you offer to customers.

Adding a New Service

  1. Navigate to Services in the admin menu
  2. Click "Add New Service"
  3. Fill in the service details
  4. Click "Create Service"

Service Fields

Field Type Description
Service Name Required Text Display name of the service (e.g., "Haircut", "Consultation")
Description Optional Textarea Detailed description shown to customers
Duration Required Number Service duration in minutes (15, 30, 45, 60, etc.)
Price Optional Decimal Service price (for display only, not for payment)
Capacity Required Number Maximum simultaneous bookings (usually 1)
Active Status Checkbox Whether service is available for booking

Example Service Configuration

Service Name: 30-Minute Consultation Description: Initial consultation to discuss your needs and goals Duration: 30 minutes Price: $50.00 Capacity: 1 Active: ✓ Yes

Editing Services

To modify an existing service:

  1. Go to Services
  2. Find the service you want to edit
  3. Click the "Edit" button
  4. Make your changes
  5. Click "Update Service"

Deleting Services

Warning

Deleting a service will also delete all associated bookings. Consider deactivating instead of deleting if you want to preserve booking history.

Deactivating vs. Deleting

  • Deactivate: Service is hidden from customers but data is preserved. Can be reactivated anytime.
  • Delete: Permanently removes service and all associated bookings. Cannot be undone.

Working Hours & Shifts Configuration

Configure your availability schedule with support for multiple shifts per day to control when customers can book appointments.

Multiple Shifts Per Day

The system supports up to 3 shifts per day (Morning, Afternoon, Evening). This is perfect for businesses with:

  • Lunch breaks - Close during lunch and reopen after
  • Split schedules - Different opening times throughout the day
  • Peak hours focus - Only open during busy periods

Using Pre-Built Templates

Save time with 8 ready-made schedule templates:

  1. 24/7 Operations - Round-the-clock service (all days, 00:00-23:59)
  2. Standard Business Hours - Monday-Friday, 9 AM - 5 PM
  3. Restaurant Hours - Lunch (11 AM - 2 PM) and Dinner (5 PM - 10 PM) shifts
  4. Healthcare Clinic - Weekdays 8 AM - 6 PM, Saturday mornings 9 AM - 1 PM
  5. Retail Store - 7 days, 10 AM - 8 PM
  6. Spa & Salon - Tuesday-Sunday, 9 AM - 7 PM (Monday off)
  7. Fitness Center - Early morning to late evening, 6 AM - 10 PM
  8. Education - School hours, Monday-Friday, 8 AM - 4 PM
One-Click Setup

Click "Apply Template" button, select a template, and your working hours are configured instantly. You can then customize as needed.

Configuring Working Hours Manually

  1. Navigate to Working Hours in the admin menu
  2. For each day of the week:
    • Check/uncheck "Day Enabled" to toggle availability
    • For each shift (up to 3):
      • Set start time
      • Set end time
  3. Click "Save Working Hours"

Example: Restaurant with Lunch & Dinner

Day Shift 1 (Lunch) Shift 2 (Dinner)
Monday-Sunday 11:00 AM - 2:00 PM 5:00 PM - 10:00 PM

The system will only show booking slots during 11 AM-2 PM and 5 PM-10 PM. The 2 PM-5 PM gap is automatically blocked.

How Time Slots Work

The system automatically generates available time slots based on:

  • Your working hours & shifts - When you're available across all shifts
  • Service duration - How long each service takes
  • Existing bookings - Times already booked
  • Service capacity - Maximum simultaneous bookings
  • Holidays - Days marked as closed

Example Calculation:

Time Slot Example

Working Hours: 9:00 AM - 5:00 PM
Service Duration: 30 minutes
Available Slots:

9:00 AM, 9:30 AM, 10:00 AM, 10:30 AM... 4:00 PM, 4:30 PM

Note: 4:30 PM is the last slot because a 30-minute service would end at 5:00 PM (your closing time).

Holiday Management

Block specific dates when your business is closed to prevent customer bookings on holidays and special closure days.

Adding Holidays

Navigate to Holidays in the admin menu. You have three options:

1. Import Popular Holidays

Load pre-configured national holidays with one click:

  • United States - 10 federal holidays (New Year's Day, Memorial Day, Independence Day, Labor Day, Thanksgiving, Christmas, etc.)
  • United Kingdom - 8 bank holidays
  • Canada - 11 statutory holidays
  • Australia - 7 national public holidays
Import Instructions

1. Click "Import Holidays" button
2. Select country from dropdown
3. Click "Import Selected Holidays"
4. Holidays are added automatically for the current year

Tip: Mark holidays as "Recurring" so they repeat annually.

2. Add Custom Holidays

Create business-specific closures:

  1. Click "Add Holiday" button
  2. Enter holiday name (e.g., "Company Anniversary")
  3. Select date
  4. Check "Recurring" if holiday repeats yearly
  5. Choose closure type:
    • Full Day - Entire day blocked
    • Partial Day - Only specific hours blocked
  6. Click "Save Holiday"

Recurring Holidays

Mark holidays as recurring to automatically block them every year:

  • Christmas (December 25)
  • New Year's Day (January 1)
  • Your business anniversary
  • Regular staff training days

Full Day vs Partial Day Closures

Type Description Example
Full Day Entire day is blocked Christmas Day - Completely closed
Partial Day Only specific hours blocked New Year's Eve - Close at 2 PM

Managing Existing Holidays

  • Edit - Modify holiday name, date, or settings
  • Delete - Remove holiday (bookings allowed again)
  • Toggle Recurring - Change if holiday repeats yearly
Booking Prevention

When a date is marked as a holiday, customers cannot book appointments for that day. Existing bookings are not affected. If you need to cancel existing bookings on a holiday, do so manually from the Bookings page.

Capacity Management

Control how many appointments can be scheduled simultaneously to prevent overbooking and manage your resources effectively.

Two-Level Capacity System

1. Global System Capacity

Set the maximum number of concurrent bookings across all services for a single time slot.

Use Case Examples:

  • Salon with 5 chairs - Maximum 5 simultaneous appointments
  • Clinic with 3 exam rooms - Maximum 3 concurrent patients
  • Co-working space - 10 meeting rooms available
Example: Global capacity = 5 At 2:00 PM time slot: - 2 haircuts booked - 1 manicure booked - 1 facial booked - 1 massage booked = 5 total (CAPACITY REACHED - slot unavailable)

2. Service-Specific Capacity

Override global capacity for individual services with unique requirements.

Use Case Examples:

  • Massage therapy - Only 1 therapist available (capacity: 1)
  • Group fitness class - 20 participants allowed (capacity: 20)
  • Consultation - 1 consultant (capacity: 1)
Service Capacity Reason
Haircut 5 (uses global) 5 stylists available
Massage 1 (service-specific) Only 1 massage therapist
Yoga Class 15 (service-specific) Studio holds 15 mats

Configuring Capacity

Global Capacity

  1. Navigate to Settings
  2. Find "System Capacity" field
  3. Enter maximum concurrent bookings
  4. Save settings

Per-Service Capacity

  1. Navigate to Services
  2. Edit a service
  3. Set "Service Capacity" field
  4. Leave blank to use global capacity
  5. Enter number to override global setting
  6. Save service

How Capacity Affects Bookings

The system checks capacity in real-time:

  • Available slots - Show only when capacity allows
  • Fully booked slots - Automatically hidden from customers
  • Capacity warnings - Admin sees capacity utilization
Overbooking Prevention

Capacity limits are enforced automatically. Customers cannot select time slots that would exceed your capacity. This prevents double-booking and resource conflicts.

Managing Bookings

View, manage, and track all customer appointments from the bookings panel.

Viewing Bookings

Navigate to Bookings to see all appointments with the following information:

  • Booking ID - Unique reference number
  • Customer Name - Who made the booking
  • Email & Phone - Contact information
  • Service - Which service was booked
  • Date & Time - Appointment schedule
  • Status - Current booking status
  • Notes - Customer's message/notes

Booking Statuses

Status Meaning Action
Pending Awaiting confirmation Review and approve or reject
Confirmed Appointment approved Customer notified, will attend
Completed Service provided Archived for records
Cancelled Appointment cancelled Time slot freed for others

Approving Bookings

  1. Find the pending booking
  2. Click "View Details"
  3. Review customer information
  4. Click "Approve"
  5. Customer receives confirmation email automatically

Cancelling Bookings

  1. Find the booking to cancel
  2. Click "Cancel"
  3. Confirm the cancellation
  4. Time slot becomes available again
  5. Customer is notified (if emails are enabled)

Editing Booking Details

You can modify:

  • Customer name, email, phone
  • Appointment date and time
  • Service selection
  • Admin notes
Email Notifications

When you change a booking's status, the customer is automatically notified via email (if email sending is enabled in config.php).

Filtering and Searching

Use the built-in filters to find bookings:

  • By Status: View only pending, confirmed, etc.
  • By Date: Show bookings for specific dates
  • By Service: Filter by service type
  • Search: Find by customer name or email

Customer Appointment Tickets

Customers can download PDF appointment tickets that include:

  • QR code with booking reference
  • Appointment details
  • Business contact information
  • Service information

Payment Processing

Accept online payments through Stripe and PayPal with flexible payment options for your bookings.

Supported Payment Gateways

Gateway Accepted Methods Best For
Stripe Credit/debit cards, digital wallets Direct card payments, international
PayPal PayPal accounts, guest checkout Customers with PayPal accounts

Payment Modes

Choose how customers pay for appointments:

1. Free Bookings

No payment required. Customers book without entering payment information.

Use for: Free consultations, no-charge services

2. Full Payment

100% payment required before appointment confirmation.

Use for: Pre-paid services, event tickets, deposits

3. Percentage Deposit

Charge a percentage of total price upfront (e.g., 50%, 25%).

Use for: Securing bookings while allowing balance payment later

Example: Service costs $100 Deposit: 50% Customer pays: $50 now Balance due at appointment: $50

4. Fixed Deposit

Charge a fixed amount regardless of service price (e.g., $50 deposit).

Use for: Standard deposits, cancellation protection

Setting Up Payment Gateways

Stripe Configuration

  1. Create account at stripe.com
  2. Navigate to Developers → API Keys
  3. Copy your:
    • Publishable Key (starts with pk_)
    • Secret Key (starts with sk_)
  4. In admin panel: Settings → Payment Settings
  5. Enter Stripe keys
  6. Choose "Live" or "Test" mode
  7. Save settings

PayPal Configuration

  1. Create account at paypal.com
  2. Go to Developer Dashboard
  3. Create REST API app
  4. Copy your:
    • Client ID
    • Client Secret
  5. In admin panel: Settings → Payment Settings
  6. Enter PayPal credentials
  7. Choose "Sandbox" or "Live" mode
  8. Save settings

Sandbox vs Live Mode

Mode Description Use When
Sandbox/Test Test payments, no real money Testing, development, demo
Live/Production Real payments, actual charges After testing, accepting customers
Test First!

Always test payment processing in Sandbox/Test mode before going live. Use test credit cards provided by Stripe and PayPal to verify everything works correctly.

Currency Configuration

The system supports 20+ currencies including:

  • USD, EUR, GBP, CAD, AUD
  • JPY, CNY, INR, BRL, MXN
  • And more...

Configure currency in Settings → General Settings

Payment Workflow

  1. Customer selects service and time
  2. Enters contact information
  3. Booking created with "Pending" status
  4. Redirected to payment page
  5. Selects payment method (Stripe or PayPal)
  6. Completes payment through gateway
  7. Returns to confirmation page
  8. Booking status updates to "Confirmed"
  9. Payment receipt email sent

Webhook Security

The system uses webhooks to verify payments securely:

  • Stripe Webhooks - Confirms charge succeeded
  • PayPal IPN - Validates payment completion
  • Signature Verification - Prevents fraud
Webhook URLs

Stripe: https://yourdomain.com/webhooks/stripe.php
PayPal: https://yourdomain.com/webhooks/paypal.php

Configure these URLs in your payment gateway dashboards to receive payment confirmations.

Viewing Payment Transactions

All payments are logged in the database. View them from:

  • Reports → Revenue Summary - Payment analytics
  • Bookings - See payment status per booking
  • Database - payment_transactions table

Reports & Analytics

Make data-driven decisions with 6 comprehensive analytics reports featuring interactive charts and CSV export.

Accessing Reports

Navigate to Reports in the admin menu. Select a report type and date range, then click "Generate Report".

1. Bookings Overview Report

Shows:

  • Total bookings by status (Pending, Confirmed, Completed, Cancelled)
  • Daily booking trends with line charts
  • Status distribution with pie charts
  • Peak booking days identification

Use for: Understanding booking patterns and status trends

2. Revenue Summary Report

Shows:

  • Total revenue earned
  • Average booking value
  • Revenue by payment method (Stripe, PayPal, Cash, Free)
  • Daily revenue trends with bar charts
  • Payment method distribution
  • Free vs paid bookings comparison

Use for: Tracking income, payment method preferences, revenue growth

3. Service Popularity Analysis

Shows:

  • Booking count per service
  • Revenue generated by each service
  • Average price per service
  • Service performance comparison
  • Top revenue-generating services

Use for: Identifying best-selling services, pricing optimization

4. Customer Insights Report

Shows:

  • Total customers and repeat customers
  • New vs returning customer ratio
  • Most frequent customers
  • Customer acquisition trends
  • Average bookings per customer

Use for: Understanding customer loyalty, repeat business

5. Peak Hours Analysis

Shows:

  • Busiest hours of the day
  • Most popular days of the week
  • Time slot utilization patterns
  • Hourly and weekly distribution charts

Use for: Staffing optimization, scheduling improvements

6. Time Period Comparison

Shows:

  • Current period vs previous period
  • Month-over-month growth
  • Year-over-year trends
  • Performance changes over time

Use for: Measuring business growth, seasonal trends

Report Features

Custom Date Ranges

Select any from/to date range to analyze specific periods:

  • Last 7 days
  • Last 30 days
  • This month
  • Last month
  • This year
  • Custom range (select specific dates)

CSV Export

Download report data as CSV files for:

  • Further analysis in Excel/Google Sheets
  • Creating custom visualizations
  • Archiving historical data
  • Sharing with stakeholders

Interactive Charts

Reports include beautiful Chart.js visualizations:

  • Line Charts - Trends over time
  • Bar Charts - Comparisons between items
  • Pie Charts - Distribution percentages
  • Doughnut Charts - Category breakdowns
Real-Time Data

All reports use live data from your database. Generate reports anytime to see up-to-the-minute statistics.

Email Templates

Customize automated email notifications with a visual editor and dynamic variables.

Available Email Templates

Template Sent When Recipient
Booking Confirmation Customer completes booking Customer
Cancellation Notice Booking is cancelled Customer
Admin Notification New booking received Administrator

Editing Email Templates

  1. Navigate to Email Templates
  2. Click template to edit
  3. Use WYSIWYG editor to format content
  4. Insert dynamic variables
  5. Customize subject line
  6. Enable/disable template
  7. Save changes

WYSIWYG Email Editor

The TinyMCE editor provides:

  • Rich Text Formatting - Bold, italic, colors, fonts
  • Images - Add logos and graphics
  • Links - Insert URLs
  • Tables - Organize information
  • HTML Source - Advanced customization

Dynamic Variables

Insert personalized information using placeholders:

Variable Replaced With
{customer_name} Customer's full name
{service_name} Booked service name
{booking_date} Appointment date
{booking_time} Appointment time
{booking_reference} Unique booking ID
{price} Service price
{business_name} Your business name
{admin_email} Admin contact email

Using Variables

Dear {customer_name}, Your appointment for {service_name} is confirmed for {booking_date} at {booking_time}. Booking Reference: {booking_reference} Total Price: {price} Thank you, {business_name}

Test Email Function

Before activating a template, test it:

  1. Edit the template
  2. Click "Send Test Email"
  3. Enter your email address
  4. Receive test with sample data
  5. Verify formatting and content

Enabling/Disabling Templates

Toggle templates on/off without deleting them:

  • Enabled - Emails sent automatically
  • Disabled - No emails sent for this event
Email Requirements

Emails require SMTP configuration (see Email Settings section below). Without SMTP, emails may not be delivered reliably or could go to spam.

Import/Export & Data Management

Export your data for backup, analysis, or migration. Import data in bulk to save time.

Exporting Data

Navigate to Import/Export in admin menu.

Available Export Types

Data Type Format Use For
Bookings CSV, JSON Backup appointments, analytics
Services CSV, JSON Service catalog backup
Working Hours JSON Schedule backup, templates
Holidays CSV, JSON Holiday list backup
Email Templates JSON Template backup, reuse
Settings JSON Configuration backup
Database Backup SQL Complete system backup

Export Process

  1. Select data type to export
  2. Choose format (CSV or JSON)
  3. For bookings: optionally select date range
  4. Click "Export"
  5. File downloads automatically

Importing Data

Supported Import Types

  • Bookings (CSV, JSON)
  • Services (CSV, JSON)
  • Working Hours (JSON)
  • Holidays (CSV, JSON)

Import Modes

Mode Action Use When
Append Add new records, keep existing Adding data without removing current
Replace Delete existing, import new Fresh start, restoring backup

Import Process

  1. Prepare CSV or JSON file
  2. Select data type to import
  3. Choose import mode (Append/Replace)
  4. Upload file
  5. Review validation results
  6. Confirm import
Replace Mode Warning

Replace mode deletes existing data! Always backup before using replace mode. This action cannot be undone.

Database Backup

Create complete SQL backup:

  1. Navigate to Import/Export
  2. Click "Backup Database"
  3. SQL file downloads
  4. Store safely off-server

Backup Includes

  • All bookings
  • All services
  • Working hours
  • Holidays
  • Email templates
  • Settings
  • Admin accounts
  • Payment transactions

CSV File Format

When creating CSV files for import, ensure:

  • First row - Column headers
  • UTF-8 encoding - For special characters
  • Date format - YYYY-MM-DD
  • Time format - HH:MM:SS (24-hour)
  • Required fields - Include all mandatory columns

Example: Bookings CSV

customer_name,customer_email,customer_phone,service_id,booking_date,booking_time,status John Doe,john@example.com,555-1234,1,2025-01-15,10:00:00,confirmed Jane Smith,jane@example.com,555-5678,2,2025-01-16,14:30:00,pending

Batch Operations

Import hundreds of records at once:

  • Migrate from another system
  • Bulk create services
  • Import historical bookings
  • Restore from backup
Validation

The system validates all imports before saving. Invalid records are reported, and you can correct errors before re-importing.

Customization

Customize the booking system to match your brand and business requirements.

Configuration File Settings

The config.php file contains key settings for easy customization without code changes:

Application Branding

// config.php define('APP_NAME', 'Your Business Name'); define('APP_URL', 'https://yourdomain.com'); define('ADMIN_EMAIL', 'admin@yourdomain.com');

Timezone Configuration

// Set your timezone date_default_timezone_set('America/New_York'); // EST date_default_timezone_set('Europe/London'); // GMT date_default_timezone_set('Asia/Tokyo'); // JST

Booking Defaults

// Time slot interval (minutes) define('DEFAULT_TIME_SLOT_INTERVAL', 15); // 15, 30, or 60 // Minimum booking notice (hours) define('DEFAULT_MIN_BOOKING_NOTICE', 2); // How far in advance customers must book

Admin Settings Page

Most customization can be done directly from the admin panel (Settings page) without editing code:

  • Business Information - Name, email, phone, address
  • Timezone - Choose from dropdown list
  • Time Slot Interval - 15, 30, or 60 minutes
  • Minimum Booking Notice - Hours in advance required
  • Maximum Booking Days Ahead - How far in advance customers can book
  • System Capacity - Maximum concurrent bookings
  • Currency - USD, EUR, GBP, CAD, AUD, and 15+ more
  • Price Display - Show/hide service prices

Customizing Colors and Design

Front-End Booking Interface

The customer booking interface uses CSS variables defined in index.php (embedded styles):

/* Find this in index.php around line 171 */ :root { --primary-color: #667eea; /* Main brand color (purple) */ --secondary-color: #764ba2; /* Secondary color */ } body { background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%); }

Change these hex colors to match your brand:

  • Blue theme: #3b82f6 and #1e40af
  • Green theme: #10b981 and #059669
  • Red theme: #ef4444 and #dc2626
  • Orange theme: #f97316 and #ea580c

Admin Panel Design

The admin sidebar gradient is defined in admin/includes/header.php:

/* Find this around line 24 */ :root { --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%); } .sidebar { background: var(--primary-gradient); }

Database-Driven Customization

The script uses a settings table for configuration stored in the database:

Setting Customization Managed From
Business Name Appears in emails and booking confirmation Admin → Settings
Working Hours Define availability with shifts Admin → Working Hours
Holidays Block specific dates Admin → Holidays
Email Templates Customize all automated emails Admin → Email Templates
Services Add/edit/reorder services Admin → Services

Customizing the Booking Form

The booking form is in index.php (around line 300+). Common customizations:

1. Adding Custom Fields

Add additional input fields to collect more information:

<!-- Add after existing customer fields --> <div class="mb-3"> <label for="company" class="form-label">Company Name (Optional)</label> <input type="text" class="form-control" id="company" name="company"> </div>

Then modify the booking creation code (around line 88) to save the field:

$company = sanitize($_POST['company'] ?? ''); $bookingId = $db->insert('bookings', [ // ... existing fields ... 'notes' => $notes, 'company' => $company // Add this ]);

2. Making Phone Number Optional

Remove the validation in index.php around line 60:

// Comment out or remove this validation: // if (!isValidPhone($customerPhone)) { // $errors[] = 'Please enter a valid phone number'; // }

3. Adding Terms and Conditions Checkbox

<div class="form-check mb-3"> <input type="checkbox" class="form-check-input" id="terms" name="terms" required> <label class="form-check-label" for="terms"> I agree to the <a href="/terms.html" target="_blank">Terms & Conditions</a> </label> </div>

Date and Time Formatting

Date/time formats are handled in includes/functions.php. The system uses standard PHP formats:

// US Format: 12/25/2025 $formatted = date('m/d/Y', strtotime($date)); // European Format: 25/12/2025 $formatted = date('d/m/Y', strtotime($date)); // ISO Format: 2025-12-25 $formatted = date('Y-m-d', strtotime($date)); // Time Formats $time12hr = date('g:i A', strtotime($time)); // 2:30 PM $time24hr = date('H:i', strtotime($time)); // 14:30

Email Customization

All emails are fully customizable through the admin panel (Email Templates):

  • Use the WYSIWYG editor to format content
  • Insert dynamic variables for personalization
  • Customize subject lines
  • Add your branding, logos, colors
  • Enable/disable specific templates

No need to edit PHP files for email customization!

Advanced Customization

Custom Validation Rules

Modify validation functions in includes/functions.php:

// Example: Require phone numbers to be 10 digits function isValidPhone($phone) { $cleaned = preg_replace('/[^0-9]/', '', $phone); return strlen($cleaned) === 10; }

Custom Payment Logic

Payment processing is in includes/payment.php. Modify functions like:

  • isPaymentRequired() - Determine if payment is needed
  • calculatePaymentAmount() - Calculate deposit amounts
  • getPaymentMode() - Get current payment settings

Custom Capacity Rules

The capacity checking logic is in includes/functions.php:

  • isTimeSlotAvailable() - Checks capacity and conflicts
  • getMaxCapacity() - Returns global/service capacity
File Structure

Front-End Files:

  • index.php - Main booking interface
  • calendar.php - Calendar view
  • success.php - Booking confirmation
  • ticket.php - PDF ticket generation

Core Logic:

  • includes/functions.php - Helper functions
  • includes/database.php - Database class
  • includes/email.php - Email functions
  • includes/payment.php - Payment logic
Best Practice

Always backup your files before making customizations. Test changes in a development environment first. Use the admin settings whenever possible instead of editing code directly.

Security Best Practices

Keep your appointment booking system secure with these guidelines.

Built-in Security Features

  • Password Hashing: Bcrypt with cost factor 10
  • SQL Injection Protection: PDO prepared statements
  • XSS Protection: Input sanitization and output escaping
  • CSRF Protection: Session tokens on forms
  • Session Security: Automatic timeout and regeneration

Recommended Security Measures

1. Delete Installation File

Critical

After installation, delete install.php immediately to prevent unauthorized reinstallation.

2. Secure Admin Directory

Add additional .htaccess protection to /admin/ directory:

# /admin/.htaccess # IP Whitelist (optional) Order Deny,Allow Deny from all Allow from 123.456.789.0 # Or use HTTP authentication AuthType Basic AuthName "Admin Area" AuthUserFile /path/to/.htpasswd Require valid-user

3. Use HTTPS

Always use SSL/TLS certificates (free from Let's Encrypt):

  • Protects login credentials
  • Encrypts customer data
  • Improves SEO rankings
  • Builds customer trust

4. Regular Backups

Implement automated backups:

  • Database: Daily automated MySQL dumps
  • Files: Weekly full backup
  • Storage: Off-site backup location
  • Testing: Regularly test backup restoration

5. Strong Passwords

  • Minimum 12 characters
  • Mix of uppercase, lowercase, numbers, special characters
  • Use a password manager
  • Change passwords regularly
  • Never reuse passwords

6. Keep Software Updated

  • Update PHP to latest stable version
  • Keep MySQL/MariaDB current
  • Apply security patches promptly
  • Monitor security advisories

7. File Permissions

Directories: 755 PHP files: 644 config.php: 600 (read/write owner only)

8. Database Security

  • Use unique database username (not "root")
  • Strong database password
  • Limit database user privileges to necessary tables only
  • Don't use default "localhost" if possible

Security Monitoring

Monitor for suspicious activity:

  • Failed login attempts
  • Unusual booking patterns
  • File modification times
  • Database size changes

Troubleshooting Guide

Solutions to common issues and problems.

Installation Issues

Problem: "Database connection failed"

Solutions:

  • Verify database credentials in config.php
  • Check if MySQL service is running
  • Try "localhost" or "127.0.0.1" as database host
  • Ensure database user has proper privileges
  • Contact hosting provider about database access

Problem: "500 Internal Server Error"

Solutions:

  • Check PHP error logs
  • Verify .htaccess file syntax
  • Ensure mod_rewrite is enabled (Apache)
  • Check file permissions (755 for directories, 644 for files)
  • Disable .htaccess temporarily to test

Problem: "PHP version not supported"

Solutions:

  • Upgrade PHP to 8.1 or higher
  • Check with hosting provider about PHP versions
  • Use cPanel or Plesk to change PHP version

Booking Issues

Problem: "No available time slots"

Solutions:

  • Check working hours are configured
  • Verify services are active
  • Ensure service duration fits within working hours
  • Check if capacity is set to at least 1
  • Clear any overlapping test bookings

Problem: "Bookings not appearing in admin panel"

Solutions:

  • Verify database connection
  • Check if bookings table exists
  • Look for PHP errors in logs
  • Test with a new booking
  • Check timezone settings match server timezone

Email Issues

Problem: "Emails not being sent"

Solutions:

  • Verify SEND_MAILS = true in config
  • Check spam/junk folders
  • Test PHP mail() function on your server
  • Configure SMTP instead of PHP mail()
  • Check email logs if available
  • Verify from email domain matches hosting domain

Problem: "Emails going to spam"

Solutions:

  • Use SMTP authentication
  • Set up SPF records for your domain
  • Configure DKIM signing
  • Use a dedicated email service
  • Ensure from email matches domain

Admin Panel Issues

Problem: "Can't login to admin panel"

Solutions:

  • Verify username and password
  • Check if admin account exists in database
  • Reset password
  • Clear browser cookies and cache
  • Check session configuration in PHP

Problem: "Session timeout too short"

Solutions:

  • Increase ADMIN_SESSION_TIMEOUT in config.php
  • Check PHP session.gc_maxlifetime setting
  • Verify server time is correct

Performance Issues

Problem: "Page loading slowly"

Solutions:

  • Enable PHP OpCache
  • Optimize database tables
  • Add database indexes
  • Enable Gzip compression
  • Use CDN for static assets
  • Upgrade hosting plan if needed

Getting Help

Support Options

Before contacting support, please have ready:

  • Your license key
  • PHP version (phpinfo())
  • MySQL version
  • Server error logs
  • Steps to reproduce the issue
  • Screenshots if applicable

Frequently Asked Questions (FAQ)

Common questions about using the Appointment Booking System.

Technical Questions

Q: Can I use this script on multiple domains?

It depends on your license type. The Standard License allows use on one domain. The Extended License allows use on one domain with paying customers. The Developer License allows unlimited domain usage.

Q: Does this work with WordPress?

This is a standalone PHP script and doesn't require WordPress. However, you can embed the booking form into WordPress using an iframe or by placing the script files in a subdirectory.

Q: Can I customize the database structure?

Yes, you have full access to the source code and database. You can add custom fields, tables, and relationships as needed. Remember to maintain proper indexes and foreign keys for performance.

Q: Is the code encrypted or encoded?

No, all source code is provided in plain, readable PHP. You have complete access to modify and customize the system as needed.

Q: What PHP version is required?

PHP 8.1 or higher is required. We recommend always using the latest stable PHP version for security and performance.

Q: Can I integrate with third-party APIs?

Yes, the system is designed to be extensible. You can add integrations with payment gateways, CRM systems, calendar services (Google Calendar, Outlook), SMS providers, and more.

Q: Does it support multiple languages?

The system includes language configuration options. You can translate all text strings in the language files or directly in the template files.

Usage & Features

Q: Can customers reschedule or cancel appointments?

Yes, customers receive a unique booking link in their confirmation email that allows them to view, reschedule, or cancel their appointments.

Q: How many services can I add?

There's no limit. You can create unlimited services, each with its own duration, price, capacity, and working hours.

Q: Can I block specific dates or time slots?

Yes, use the capacity management feature to set capacity to 0 for specific dates or times you want to block. You can also adjust working hours per service.

Q: Does it support recurring appointments?

The base system handles single appointments. For recurring bookings, you can customize the code or allow customers to book multiple appointments at once.

Q: Can multiple staff members manage bookings?

The admin panel supports admin authentication. For multiple staff with separate calendars, you'll need to customize the system to add staff management and assignment features.

Q: How are timezone differences handled?

Set your timezone in config.php. All times are stored in your server timezone. For international customers, you may want to add timezone selection or display times in local customer timezone.

Q: Can I accept deposits instead of full payment?

Yes, the payment amount is configurable. You can set it to require full payment, partial deposit, or make payment optional.

Q: Does it support group bookings?

Yes, use the capacity feature. Set capacity > 1 to allow multiple customers to book the same time slot (e.g., for classes or group sessions).

Q: Can I send SMS notifications?

SMS functionality is not included by default but can be added by integrating with SMS providers like Twilio, Nexmo, or similar services.

Q: How do refunds work?

Refunds must be processed through your payment gateway (PayPal or Stripe admin panel). The system records the refund status when updated via webhooks.

Support & Updates

Q: Do I get lifetime updates?

Yes, all license types include lifetime updates at no additional cost. You'll receive all future versions and improvements.

Q: What kind of support is included?

We provide email support for installation, configuration, and bug fixes. Extended License and Developer License include priority support.

Q: How long does support last?

Support is included for the lifetime of your license. We're committed to helping you succeed with the system.

Q: Can I request custom features?

Custom development is available for an additional fee. Contact us to discuss your requirements and get a quote.

Still Have Questions?

If you couldn't find an answer to your question, please feel free to contact our support team. We're here to help!

Need More Help?

Our support team is here to assist you with installation, configuration, and customization.

Contact Support