# TDL.com.my — PHP version

Same site as the HTML version, but pages are PHP with shared includes.
Public URLs stay as .html (e.g. /about.html) — the .htaccess serves the
matching .php behind the scenes, so existing links and SEO are unaffected.

## How it works
- partials/header.php and partials/footer.php hold the shared header & footer.
- Each page (index.php, about.php, blogs/*.php) includes those partials and
  sets $root ('' at top level, '../' inside /blogs/) and $active (nav highlight).
- js/site.js now only handles behaviour (sticky header, mobile menu, slideshow,
  scroll reveal) — the header/footer are rendered server-side, not by JS.
- .htaccess rewrites page.html -> page.php silently, forces https + www, and
  blocks direct access to /partials and /PHPMailer.

## Requirements
- Any normal PHP host (cPanel/Apache). PHP 7.x or 8.x.
- mod_rewrite enabled (standard on cPanel) for the .html -> .php rule.

## Contact form
Same as before: contact-us.php posts to send.php (SMTP via PHPMailer).
Fill in the SMTP CONFIG block in send.php and create the mailbox in cPanel.
See the contact-form notes below.

## Deploy
1. Upload everything to your web root (public_html).
2. Make sure .htaccess uploaded (it's a hidden file).
3. Visit https://www.tdl.com.my/ — index.php loads, links show as .html.
4. Configure send.php (SMTP) and test the contact form on the live host.

## URLs
All public URLs are .html and unchanged from the old site:
/  /index.html /welcome.html /about.html /mission.html /philosophy.html
/why-us.html /blogs.html /resources.html /careers.html /contact-us.html
/terms-and-conditions.html /privacy-policy.html
/blogs/<slug>.html

## Contact form (PHP / SMTP via PHPMailer)
1. cPanel > Email Accounts: create info@tdl.com.my and set a password.
2. cPanel > Email Accounts > Connect Devices: note the SMTP host/port.
3. Edit send.php CONFIG: $SMTP_HOST, $SMTP_PORT/$SMTP_SECURE (465/ssl or 587/tls),
   $SMTP_USER, $SMTP_PASS (keep the password in SINGLE quotes).
4. PHPMailer/src is bundled. Test with a real submission; if it fails set
   $DEBUG=true in send.php to read the error, then set it back to false.
