How aryanshekhada08/php-curd-app works
Project Type and Purpose
• This is a monolithic, full-stack web application for Student Registration & Management.
• Built with PHP for server-side logic, MySQL for persistence, standard HTML/CSS/Bootstrap for UI, and DataTables for client-side table enhancements.
• Provides CRUD operations: create (registration form + image upload), read (dashboard table), update (edit form), delete (record removal).
File Structure
• Top-level .php scripts act as controllers/endpoints:
• index.php (registration form + POST → create student)
• dashboard.php (lists students, links to edit/delete)
• edit.php (loads data, POST → update)
• delete.php (handles record removal)
• thankyou.html / thankyou.css: post-submission confirmation page & styling.
• style.css: global custom styles.
• images/: stores uploaded profile pictures.
• screenshots/: docs only.
• No explicit “models” folder—data access is mixed within controller scripts.
Architecture Components
a. Client Layer
• Browser with HTML/CSS/Bootstrap UI
• DataTables JS plugin for searching & pagination
b. Web Server Layer
• Apache/Nginx + PHP runtime
• Controller scripts (index.php, edit.php, etc.) implement routing & business logic
c. Data Access Layer
• PHP code issues SQL queries against MySQL database
d. Storage Layer
• MySQL database (students table)
• File system (‘images/’ directory) for profile pictures
Interactions & Data Flow
• User fills registration form → HTTP POST to index.php
• index.php
• Validates input, saves student record to MySQL
• Stores image file under images/
• Redirects to thankyou.html
• Student list page (dashboard.php)
• Queries MySQL for all students
• Builds HTML table, DataTables adds search/pagination
• Edit flow (edit.php)
• GET loads existing data into form, POST updates MySQL & optional image
• Delete flow (delete.php)
• Deletes DB record, unlinks image file
Architectural Patterns & Principles
• Monolithic MVC-like separation (Controllers are PHP files, Views are inline HTML + Bootstrap, Model is direct SQL calls).
• Single codebase deployable on a PHP-enabled web host.
• Stateless HTTP interactions; session or cookies can be added if auth is required.