๐Ÿ” BHSA Path Diagnostic Tool

๐Ÿ“ Current File Location

This diagnostic file is at:
/home/bhsaedup/public_html/application.bhsa.edu.ph/diagnostic.php
Current directory:
/home/bhsaedup/public_html/application.bhsa.edu.ph
Document root:
/home/bhsaedup/public_html/application.bhsa.edu.ph
Current URL:
http://application.bhsa.edu.ph/diagnostic.php

๐Ÿ“‚ File Structure Check

Root Directory Files:

FileStatusFull Path
config.phpโœ… FOUND/home/bhsaedup/public_html/application.bhsa.edu.ph/config.php
dashboard.phpโŒ NOT FOUND/home/bhsaedup/public_html/application.bhsa.edu.ph/dashboard.php
index.phpโŒ NOT FOUND/home/bhsaedup/public_html/application.bhsa.edu.ph/index.php
print-application.phpโœ… FOUND/home/bhsaedup/public_html/application.bhsa.edu.ph/print-application.php
r3.pngโœ… FOUND/home/bhsaedup/public_html/application.bhsa.edu.ph/r3.png
bhsa_logo.pngโœ… FOUND/home/bhsaedup/public_html/application.bhsa.edu.ph/bhsa_logo.png

Pages Directory:

โŒ Pages folder NOT FOUND at: /home/bhsaedup/public_html/application.bhsa.edu.ph/pages
โš ๏ธ Uploads folder not found (will be created when needed)

๐Ÿ”ง Correct Paths for Your Setup

โœ… print-application.php is in the correct location!

For pages/view-applicant.php, use this path:
../print-application.php?id={ID}
โš ๏ธ If the print button still doesn't work, the issue might be:
  1. JavaScript popup blocker in your browser
  2. Incorrect path in the view-applicant.php file
  3. Session/authentication issue
Test the print page directly:
๐Ÿ–จ๏ธ Test Print (ID: 1) ๐Ÿ–จ๏ธ Test Print (ID: 2)

๐Ÿ“ Fix Instructions

Step 1: Verify print-application.php location
The file MUST be in the root directory (same folder as dashboard.php):
/home/bhsaedup/public_html/application.bhsa.edu.ph/print-application.php
Step 2: Update pages/view-applicant.php
Find the line with the print button (around line 263) and make sure it says:
<button onclick="window.open('../print-application.php?id=<?php echo $id; ?>', '_blank')">
Step 3: Clear browser cache
Press Ctrl+Shift+R (or Cmd+Shift+R on Mac) to hard refresh the page
Step 4: Check browser console for errors
Press F12 to open developer tools and check the Console tab for any JavaScript errors

๐Ÿงช Browser Console Test

Open your browser's developer console (F12) and paste this command:

window.open('../print-application.php?id=1', '_blank', 'width=1000,height=800')

If this works in the console but not from the button, it's a JavaScript issue in your page.

โ† Back to Dashboard ๐Ÿ”„ Refresh Diagnostic

๐Ÿ’ก Quick Fix Code

Copy this exact button code into your pages/view-applicant.php file (around line 263):

<button onclick="openPrintWindow(id)" class="print-btn no-print">๐Ÿ–จ๏ธ Print Application Form</button>

<script>
function openPrintWindow(id) {
    const url = '../print-application.php?id=' + id;
    console.log('Opening:', url); // For debugging
    window.open(url, '_blank', 'width=1000,height=800');
}
</script>