build backend for this frontend using php language and oop and mvc design pattern and make it can run on xampp and mysqli , php my admin change html extensions to php extensions and make the mvc like this the pages to view put it in view and classes that deal with database put it in models and classes that control the business logic put it in the controller and make a class for database that can open the connection with database and have functions insert , update , delete ,select the pages i want backend for it (advisor-dashboard.html that select the requests from database the customer submits and send recommended artworks to him) , (customer-request-advisor.html when customer submits request form it will save on database),(feedback.html when customer submits form it will be saved on database) , (admin-feedback.html admin can select form from database and view the feedback the customer submitted ) use this for more clarify Things That Might Need PHP backend:
Authentication (Login & Register)
Storing user data (Visitor / Artist / Admin / Art Advisor).
Verifying login (does the user exist? is the password correct?).
Redirecting each user to the appropriate dashboard based on their role.
Form Submission
Feedback form: sending users' opinions about the site.
Art Advisor Request form: sending answers to the art advisor.
Registration forms: submitting registration data and storing it in a file or database.
Favorites & Cart Management
Temporarily saving or updating data (in JSON files or using session).
You can use $_SESSION to keep track of favorites or cart contents during browsing.
Fake Data Fetching (Dynamic Content)
Displaying artworks, weekly collections, etc.
You can store the data in a JSON file and use PHP to fetch or update it.
eGift Cards & Discounts
Validating the entered code.
Saving purchases in a file or a simple database.
Referral Code
Generating a random code when the "Generate Referral Code" button is clicked.
Linking the code to the user or storing it in a JSON file.
Admin Actions
Accepting/rejecting artworks submitted by artists.
Reviewing forms (Feedback, Advisor requests).
Uploading artworks for weekly collections.
Things That Don’t Need PHP:
Displaying designs.
Page layout/structure.
Navigating between pages.
Animations, filters, and live previews (JS only).
Building the virtual gallery.
"View in Your Room" feature using JS and CSS. Don't use any other frameworks for front just bootstrap only
I'll create a PHP backend using OOP and MVC design patterns for your art gallery website. This implementation will work with XAMPP, using MySQLi for database connections and follow proper separation of concerns.
Let's start by setting up the MVC architecture:
Set up XAMPP:
Database Setup:
art_gallery
config/database.sql
or run the queries manuallyProject Installation:
C:\xampp\htdocs\art-gallery\
)Configuration:
config/config.php
file if needed (database credentials, base URL).htaccess
file is properly configured for your environmentFile Permissions:
uploads
directory has write permissionsAccess the Application:
http://localhost/art-gallery/
User Authentication:
Advisor Dashboard:
Customer Request System:
Feedback System:
Admin Management:
This implementation follows OOP principles with proper class inheritance, encapsulation, and separation of concerns.
I'll create the specific PHP versions of the pages you mentioned in your request, integrating them with the MVC backend structure.
I've created the PHP backend versions of the specific pages you mentioned in your request:
advisor-dashboard.php - This page allows art advisors to view customer requests and send recommended artworks. It includes:
customer-request-advisor.php - This page provides a form for customers to submit art advisor requests. It:
feedback.php - This page allows customers to submit feedback about their experience. It:
admin-feedback.php - This page allows administrators to view and manage customer feedback. It:
All these pages are integrated with the MVC architecture:
The implementation follows OOP principles with proper class inheritance and encapsulation. The database operations use MySQLi with prepared statements for security.