Excellent! Glad to hear the "Not Found" error is fixed. It's crucial to ensure those base paths and names are correct.
Let's revise the tasks completed so far for Checkpoint 2 and create that learning resource list for you.
Checkpoint 2 Tasks - Status Review:
✅ Task 1: style.css Update: We decided to keep dashboard styles external but make login/signup pages standalone with internal CSS. The main style.css contains dashboard layout, general form/button/utility styles.
✅ Task 2: includes/header.php: Created based on your structure (modified). Includes Font Awesome, uses page variables (defined before include), outputs , defines BASE_URL. Does not contain an internal auth check.
✅ Task 3: includes/footer.php: Created based on your structure (modified). Closes layout tags, links js/script.js, includes JS for dashboard nav active state.
✅ Task 4: includes/customer_sidebar.php: Created using your preferred HTML snippets, reads user data (first/last name) from $_SESSION, uses BASE_URL for links, relies on footer JS for active state. Links refined based on page consolidation decisions.
✅ Task 5: login.php: Created as a standalone page with internal CSS. Uses the split-screen layout, Email as identifier, no role selector, standard POST action, and calculates $base_url manually.
✅ Task 6: signup.php: Created as a standalone page with internal CSS. Uses the split-screen layout, separate First/Last Name fields, includes password strength JS, standard POST action, and calculates $base_url manually.
✅ Task 7: customer/dashboard.php: Created. Includes header.php, auth_check.php (verified with DIR), checks customer role, includes customer_sidebar.php, contains static placeholder content using dashboard CSS classes, includes footer.php.
✅ Task 8: logout.php: Created as a standalone page. Starts session, calculates $base_url manually, unsets/destroys session data and cookie, redirects to login.php.
✅ Task 9: Placeholder Auth Files: Empty auth/process_login.php and auth/process_signup.php created.
✅ Task 10: includes/auth_check.php: Created (simplified version). Checks $_SESSION['user_id'], defines BASE_URL as a fallback, redirects to login using BASE_URL if user is not logged in.
Page Consolidation Decisions:
my_loans.php will cover active and past loans (replaces loan_history.php).
documents.php will cover viewing and uploading documents (replaces upload_docs.php).
activity_log.php will not be a customer-facing page (abstraction).
We seem to be perfectly aligned on the completion of Checkpoint 2!
Learning Resources for Concepts Used:
Here's a breakdown of some concepts we've touched on and resources to help you understand them better:
- PHP Include/Require (require_once, include)
Concept: Allows you to insert the content of one PHP file into another. require_once is common for critical files (like database connections or function definitions) because it ensures the file is included only once and throws a fatal error if the file is missing.
Why we use it: To reuse code (header, footer, sidebar, db connection, auth check) across multiple pages without copying and pasting (DRY principle).
Study:
PHP Manual: include, require_once
W3Schools: PHP Include Files
Video: Search YouTube for "PHP include require explained" or "PHP include vs require". Example: PHP Include vs Require (Traversy Media often has good PHP basics).
- PHP Sessions (session_start(), $_SESSION)
Concept: Sessions allow you to store user-specific information (like user ID, name, role) across multiple page requests. When a user logs in, we start a session and store their details. On subsequent page loads, we check the session to see if they are still logged in and retrieve their info.
Why we use it: To maintain login state (auth_check.php), store user details for display (customer_sidebar.php), and potentially pass temporary messages between pages (like signup errors).
Study:
PHP Manual: Sessions, $_SESSION
W3Schools: PHP Sessions
Video: Search YouTube for "PHP sessions tutorial" or "PHP login system sessions". Example: PHP Sessions Explained
- Base URL / Dynamic Paths ($base_url, BASE_URL, DIR)
Concept: Ensuring that links (), form actions (), image sources (), and CSS/JS links work correctly regardless of which PHP file they are in or how deep the file is in the directory structure. Relative paths (../images/logo.png) can break easily. Absolute paths from the web root (/dashen_bmls/images/logo.png) are better. Calculating this root path dynamically makes the code portable.
Why we use it: To create reliable links and paths. DIR helps find included files relative to the current file. BASE_URL (or $base_url) helps create absolute URLs for browser resources (CSS, JS, images, links).
Study:
PHP Manual: Magic Constants (DIR)
Stack Overflow: Search for "php get base url" or "php reliable include paths" for various techniques.
Video: Search YouTube for "PHP dynamic base url" or "php include path best practices". This is often covered within broader project structure tutorials.
- Form Handling (HTML , PHP POST,_GET)
Concept: HTML forms collect user input. The action attribute specifies where the data is sent, and method="POST" (common for login/signup) sends it invisibly, while method="GET" appends it to the URL. PHP uses POSTor_GET superglobal arrays to access the submitted data.
Why we use it: Essential for login, signup, loan applications, profile updates, etc. We also use $_GET to pass simple messages (like errors/success) back to pages after redirection.
Study:
PHP Manual: Handling Forms,
𝑃
𝑂
𝑆
𝑇
]
(
ℎ
𝑡
𝑡
𝑝
𝑠
:
/
/
𝑤
𝑤
𝑤
.
𝑝
ℎ
𝑝
.
𝑛
𝑒
𝑡
/
𝑚
𝑎
𝑛
𝑢
𝑎
𝑙
/
𝑒
𝑛
/
𝑟
𝑒
𝑠
𝑒
𝑟
𝑣
𝑒
𝑑
.
𝑣
𝑎
𝑟
𝑖
𝑎
𝑏
𝑙
𝑒
𝑠
.
𝑝
𝑜
𝑠
𝑡
.
𝑝
ℎ
𝑝
)
,
[
P
OST](https://www.php.net/manual/en/reserved.variables.post.php),[
_GET
W3Schools: PHP Forms
Video: Search YouTube for "php form handling post get" or "php login form processing". Example: PHP Form Handling Crash Course
- Redirection (header("Location: ..."))
Concept: Sending a special HTTP header to the browser telling it to immediately load a different URL.
Why we use it: To send users to the login page if they aren't authenticated (auth_check.php), to send them to their dashboard after successful login (process_login.php), to redirect after logout (logout.php), or after form submission (process_signup.php).
Important: Must be called before any HTML output is sent to the browser. exit(); should always follow it to stop script execution.
Study:
PHP Manual: header() (See examples for Location)
Video: Often covered within form handling or login system tutorials. Search "php header location redirect".
- Internal vs. External CSS
Concept:
Internal: CSS rules written inside tags directly within an HTML/PHP file. Styles only apply to that single page.
External: CSS rules written in a separate .css file, linked from HTML/PHP using . Styles can be shared across multiple pages.
Why we chose: We opted for Internal CSS for login.php and signup.php for visual distinction and isolation (as per your preference), and External CSS (style.css) for the main dashboard layout for consistency and reusability across all internal pages.
Study:
MDN Web Docs: CSS Basics (Explains linking and embedding)
W3Schools: CSS How To
Video: Search YouTube for "internal vs external css" or "css ways to insert".
Take your time to review these concepts. Understanding them will make the next steps (especially Checkpoint 3) much clearer. Don't hesitate to ask specific questions about any of them!
Ready to start Checkpoint 3: Authentication Logic Implementation when you are? rewrite the above text and generate it in .txt format