How mh06a/book-store-website works
This PHP bookstore application supports account registration and login, book browsing/details, favorites, recently opened books, and profile/account management. Its likely user workflow is to browse books, open a detail page, and save favorites or recent items; authenticated users can also manage their profiles. The graph shows controller-to-model calls where the excerpts establish them. JavaScript-to-endpoint and page-to-action wiring is not evidenced in the supplied excerpts, so those links are omitted.
Main entry points: DatabaseConnection.php Database connection · DatabaseOperations.php User operations · FavoriteOperations.php Favorite and recent operations · register_action.php Register account
Components 19
Bookstore pages
- Book browsing
View/home.php - Book details
View/book_details.html - Login and registration
View/Login.html - Profile page
View/profile.html - Favorites page
View/favoriteBook.html
Request handlers
- Register account
Controller/register_action.php - Authenticate user
Controller/login_action.php - Load profile
Controller/profile.php - Update profile
Controller/update_profile.php - Delete account
Controller/delete_account.php - Change favorites
Controller/favorite_action.php - List favorites
Controller/get_favorites.php - Record recent book
Controller/add_recent.php - List recent books
Controller/get_recent.php
Application data
- User operations
Model/DatabaseOperations.php - Favorite and recent operations
Model/FavoriteOperations.php - Database connection
Model/DatabaseConnection.php
Other components
- Visitor
- MySQL database
Connections 17
- Register account → User operations: registers via
Controller/register_action.php - Authenticate user → User operations: authenticates via
Controller/login_action.php - Load profile → User operations: loads user via
Controller/profile.php - Delete account → User operations: deletes via
Controller/delete_account.php - Change favorites → Favorite and recent operations: changes favorites via
Controller/favorite_action.php - List favorites → Favorite and recent operations: reads favorites via
Controller/get_favorites.php - Record recent book → Favorite and recent operations: records via
Controller/add_recent.php - List recent books → Favorite and recent operations: reads recents via
Controller/get_recent.php - Register account → Database connection: loads connection
Controller/register_action.php - Authenticate user → Database connection: loads connection
Controller/login_action.php - Load profile → Database connection: loads connection
Controller/profile.php - Delete account → Database connection: loads connection
Controller/delete_account.php - Change favorites → Database connection: loads connection
Controller/favorite_action.php - List favorites → Database connection: loads connection
Controller/get_favorites.php - Record recent book → Database connection: loads connection
Controller/add_recent.php - List recent books → Database connection: loads connection
Controller/get_recent.php - Database connection → MySQL database: connects to
Model/DatabaseConnection.php