Final Report Web1 Lan2
Final Report Web1 Lan2
II. INTRODUCTION
The rapid evolution of digital technologies, particularly during the COVID-19 pandemic, has
reshaped education, with online platforms becoming essential for learning and interaction. This
report outlines the development of a CRUD-based web application for student interaction,
designed to replicate the functionality of platforms like Stack Overflow. The system emphasizes
usability, accessibility, and data security, drawing from user experience principles (Krug, 2014)
and web accessibility guidelines (ISO, 2019). It employs secure coding practices using PHP PDO
and MySQL to safeguard data integrity, addressing security concerns in educational technologies
(Heater, 2023). The report also covers the development process, challenges, and future
recommendations for ethical web development in education.
III. METHODOLOGY
3.1 Tools & Technologies
I used the following technologies and tools to create the web-based PHP/MySQL CRUD
system:
• Programming Language: The core functionality of the system is implemented using PHP
for server-side scripting and HTML for the structure of the web pages, in addition to CSS
files for adding a catchy look and feel to enhance the user experience. This combination
allows for dynamic content creation and user interaction.
• Styling Framework: To enhance the visual appearance of the application, I used Tailwind
CSS, a utility-first CSS framework. Tailwind allows for fast and responsive design without
extensive custom styles.
• Database Management System: The application uses MySQL as its database management
system, providing a robust platform for storing and retrieving data.
• Integrated Development Environment (IDE): For coding and development, I used Visual
Studio Code. This IDE provides a user-friendly interface and supports various extensions to
enhance coding productivity and efficiency.
• Local server environment: Development is done on a local server using XAMPP, which
provides an easy-to-use package that includes Apache, MySQL and PHP, making it suitable
for local application testing.
• Deployment Procedure: Before transferring to a live server, the application is tested locally
on XAMPP to make sure all features perform as intended. This method enables effective
iteration and debugging.
• Development Workflow: I usually use Visual Studio Code to write PHP and HTML code,
test the application on XAMPP's local server, then use phpMyAdmin, which comes with
XAMPP, to manage the MySQL database. Although this configuration does not specifically
address version control, it is advised to use a solution such as Git to improve codebase
management for the project.
Using these resources and approaches, my goal was to develop a useful and effective system
that satisfies the requirements of students who need help with their assignments. The
application's scalability and future improvements are made possible via the iterative
development process.
IV. USER REQUIREMENTS
4.1 Requirements
The goal of the web-based platform is to improve student cooperation and learning.
Students will be able to pose questions, exchange information, and ask for peer assistance in a
convenient online environment thanks to this technology. It will provide tools that let students
modify and manage their questions, arrange the information according to modules, and use a
contact form to get in touch with administrators. The system seeks to provide an engaging and
encouraging learning environment that is customized to meet the needs of every student by
combining user and module management features.
Requirement Description
Users have the ability to create, edit, and delete their own posts,
and view the list of questions from all other users, promoting
An Interactive Educational active participation and content management. The platform will
Setting support interactive features such as Show photos and add
modules to increase engagement.
Content will be categorized according to predefined modules or
topics to streamline navigation and relevance. Features will include
Management of Content filtering and search to help users find posts or information quickly
and scientifically
The platform will allow embedding images, screenshots, or
uploads from devices and other types of media in posts. Diverse
Support from the Media text formatting options, such as bolding the question heading
section and displaying list details, will be available to improve
clarity and present posts.
Every user will have a customized profile where they may edit
details like their username, email address, location, place of
Management of User employment, and home address. Users can also update their
Profiles profile details on a regular basis. The goal of this feature is to
make the user experience more interesting and individualized.
Various user roles, including: guest, user, admin will be
implemented with specific permissions to participate in viewing
Permissions depending and managing content and users. This will ensure control of
on roles individual user access rights and appropriate content information
moderation capabilities.
The platform will include a request submission form or other forms
so that users can contact the administrator with questions, feedback,
Communication and or problems. In addition, a system that stores the history of requests
Scalability and
Future features and more user activity will be supported by the
Upcoming
design's scalability, which will improve user experience.
Improvements
4.3 Use Case Diagram
Actors: Student, admin, users
Use Cases:
o Login:
▪ Description: Authenticate users using their login credentials (email and password) and
direct them to the appropriate page based on their role.
o Register:
o Navigation at Home:
o Actors: Admin and Students
o Description: Provide alternatives for navigating according to the role of the user::
o Question Page:
▪ Add question:
▪ Actors: Student
▪ Description: enables pupils to propose fresh inquiries, such as a title,
content, selecting modules, and attaching detailed images if needed.
▪ List Questions:
▪ Description:
➢ For Students:
▪ Two buttons: one to view all their own questions and one
to view questions submitted by other students.
▪ Students can edit their own questions, including
modifying content, changing modules, adding or
removing images, or deleting the question.
➢ For Guests:
o Admin Area:
o User Management:
▪ List Users:
▪ Actors: Admin
▪ Delete Users:
▪ Actors: Admin
o Module Management:
▪ List Of Modules:
▪ Actors: Admin
▪ Actors: Admin
▪ Description: Allows the admin to add, edit, or delete module names and
descriptions.
o Contact Form:
▪ Actors: Student
▪ Description: Allows students to submit a report form to the system admin. The
admin receives the report immediately after submission.
V. DESIGN
5.1 Design of Database Schemas
The posting website system's database structure is made to effectively handle and
incorporate important data components, store form information and user submitted data, etc. It
consists of 5 main tables namely "users, request_to_admin, questions, modules, admin" where
each table serves a separate function
• The module table manages information about academic modules, subjects and other
specializations. It includes an ID for distinct identification, a name for the module, and a
description for more information on the module. By ensuring that every module is uniquely
recognized and documented, this table makes it easier to organize and retrieve posts
pertaining to the module.
• Account information for system users is kept in the user table. Along with other
information to update the student profile page, such as address, about, company, and the
time the user performed actions on the site, it also contains an ID for unique identification,
a username that must be unique for each user, a password for secure authentication, and a
role to distinguish between "admin" and "student." In order to manage user accounts and
their tasks inside the system, this table is essential.
• Student-submitted postings or questions are handled via the questions table. Every post has
an ID, a title, a body, and an optional picture for visual aids. Each post is linked to its
creator by the user_id, and to a particular academic module by the module_id. The post's
lifespan is tracked by the creation and update timestamp (created_at). This table is
necessary for connecting to modules and managing user-generated material.
• The system's administrator table (admin) contains comprehensive data on the administrator's
account. It contains a password for secure authentication, an administrator name
(admin_name), which needs to be distinct for every administrator, an ID for unique
identification, and a role to distinguish between "administrator" and "student." Information
on the responses that the administrator provided to the pupils is also available (answer).
In summary, this architecture guarantees effective data management and supports the
fundamental features of the question forum system by precisely defining the responsibilities and
connections of each table.
5.2.1 Overview
The question forum system is an online tool created to let students ask and handle questions
about assignments. It offers administrative control, question management, and user
authentication. The system is set up with many parts that communicate with one another via a
clear architecture.
5.2.2. Architectural elements
5.2.2.1 Client-Side:
Technologies at the front end:
5.2.2.2 Server-Side:
Technologies at the backend:
5.2.2.3 Database:
The database employs a relational structure, leveraging MySQL to manage data efficiently.
The design follows normalization principles to reduce redundancy and enhance data integrity.
Referential integrity between tables is enforced using foreign keys, ensuring that operations such
as deletions in one table do not lead to orphaned records in another. A report by the MySQL
Documentation team (2023) underscores the importance of structuring databases with future
scalability in mind, an approach adopted in this project to accommodate potential feature
expansions such as analytics and search functionalities.
Database Structure:
Tables in databases:
• Users: Maintains user information, including hashed passwords, email addresses, and
usernames.
• Questions: Responds to user inquiries about metadata, title, content, and related photos.
• Modules: Includes details on several assignment modules.
• Admin: Contains information about administrator accounts, responses
• Request_to_admin: Contains report content or requests sent from students
5.2.2.4 Organization of Files:
• /includes: Includes necessary PHP files for database operations and connections..
o DatabaseConnection.php: Gives instructions on how to connect to the MySQL
database.
o DatabaseFunction.php: Includes database-related features like post management
and user data retrieval.
• /templates: Contains html.php files that display the interface for the entire student (user) and
admin system and also the interface when visitors access it.
o add_module.html.php: The interface adds a new module with a form for entering
names, descriptions, and error handling.
o add_question.html.php: The interface adds questions with a form to enter a title,
content, select a module, upload a photo and process a successful notification.
o admin_layout.html.php: Admin interface with sidebar manages questions, requests,
students, modules, and displays key content from $output variables.
o admin_list_question.html.php: The interface displays a list of questions with titles,
contents, images, related modules, questioner information, and a button to delete
questions with confirmation.
o admin_login.html.php: Log in form for admins with fields to enter email, password,
and display an error message if applicable.
o admin_register.html.php: The form registers an administrator account with fields to
enter name, email, password, confirm password and check password in the correct
format.
o answer_request.html.php: Interface for administrators to respond to requests with a
form that displays questions and enters answers.
o edit_module.html.php: Module information editing interface with name,
description, and update button fields.
o edit_question.html.php: a form interface for editing a question, allowing the user to
update the title, body, select a module, upload an image, and optionally delete the
current image.
o home.html.php: This is a heading element displaying the text "Welcome to the
question forum," likely serving as an introduction to a forum page where users can
post and answer questions.
o layout.html.php: A webpage layout for a guest user, featuring a sidebar with
navigation links to the home page, list of questions, student login, and admin login,
along with dynamic content output and a footer displaying the current year.
o list_module.html.php: A page displaying a list of all modules, showing the module
name and description, with a message if no modules are found.
o list_request.html.php: A page displaying a list of requests with options to view,
answer, or delete each question, along with error handling and a message if no
questions have been asked.
o login.html.php: A login form where users can enter their email and password, with
error handling and a link to the registration page for new users.
o manage_module.html.php: A page displaying a list of all modules with options to
add, edit, or delete modules, along with a message if no modules are found.
o manage_user.html.php: A page displaying a list of users (students) with their name,
email, and account creation date, along with an option to delete a user. If no users are
found, a message is shown.
o my_questions.html.php: Displays a list of a user's questions with search
functionality and options to edit or delete their own questions.
o profile.html.php: Allows users to view and update their profile information, such as
email, full name, address, and company.
o public_list_questions.html.php: Displays a list of questions with details such as
title, body, image, module, author, and creation time.
o register.html.php: This file contains a registration form with validation for
username, email, password, and password confirmation, displaying error messages
for invalid inputs.
o request_to_admin.html.php: This file allows users to submit requests to the admin
and view their previous requests and responses.
o user_layout.html.php: This file defines the layout for a user dashboard, including
navigation links for various user functionalities such as viewing questions, adding
new questions, sending requests to the admin, and managing the user's profile.
o user_list_questions.html.php: This file displays a list of questions with an option to
search for specific questions, and allows users to edit or delete their own questions. It
also shows a success message if applicable.
• /uploads: This is the folder where the images added to the question are stored and updated
by the user.
• /user: Contains php files that display commands and queries, and handle functions for the
student (user) page.
o add_question.php: Handles user submission for adding a new question, including
optional image upload, and saves the data to the database.
o delete_comment.php: Allows a user to delete their own comment, verifying the
comment's ownership before performing the deletion.
o delete_question.php: Deletes a question and its associated image (if it exists),
ensuring that the user is authorized to perform the deletion before proceeding.
o edit_question.php: The script allows logged-in users to edit their question, including
title, body, module, and image. It handles image uploads and deletions, then redirects
to the question list after successful update.
o home.php: The script checks if the user is logged in and assigns a default "Guest"
username if not. It then loads the homepage template.
o list_questions.php: The script displays a list of questions with an optional search
filter. It fetches data from the database and shows success messages if available.
o module.php: The script retrieves and displays a list of modules from the database for
logged-in users. If no modules are found, it shows an empty list.
o my_questions.php: This script retrieves and displays questions created by the
logged-in user. If an error occurs, it shows an error message.
o profile.php: After updating the logged-in user's profile, this script displays a success
message and reroutes to the profile page.
o request_to_admin.php: This script allows logged-in users to submit questions to the
admin and view their previous questions.
• /admin: Contains php files that display commands and queries, handle functions for the
admin page
o add_module.php: This script allows adding a new module to the database through a
form. Upon submission, it inserts the module and redirects to the module list.
o admin_home.php: This script sets a default username for the session if not logged in,
and then displays the home page using the `home.html.php` template within the admin
layout.
o answer_request.php: This script allows admins to answer user-submitted questions
and updates the response in the database.
o delete_module.php: Using the module's ID supplied by the URL, this script removes it
from the database.
o delete_question.php: Using the ID supplied by the URL, this script removes a
question from the database before rerouting to the question list.
o delete_request.php: Using the `id` supplied in the URL, the script deletes a request
from the database and reroutes to the request list page.
o delete_user.php: This script deletes a user by ID from the database and redirects to the
user management page, or shows an error message if something goes wrong.
o edit_module.php: The script allows an admin to edit a module's name and description,
and updates the module in the database upon submission.
o list_questions.php: The script retrieves all questions from the database, with an
optional search feature based on title, body, or module, and displays them in the admin
panel.
o list_request.php: This script retrieves and displays all user-submitted questions from
the `request_to_admin` table, ordered by the most recent, in the admin panel.
o manage_user.php: This script retrieves all user records from the `users` table, ordered
by creation date, and displays them in the admin panel for user management.
o module.php: This script fetches and displays all modules from the database for admin
management. If an error occurs, it shows an error message.
• Public:
o admin_login.php: Admin login is handled by this script. If successful, it launches a
session after comparing the supplied email address and password with the database. If
the credentials are incorrect, it shows an error message.
o adminstyle.css: This code styles a webpage with a sidebar and content area. The
sidebar has a fixed position with a hover effect on links, and the content area is
responsive to different screen sizes.
o index.php: This file includes the `public_home.php` file, likely to display the main
public-facing page of the website.
o login.php: This PHP file handles the login functionality: it validates user credentials
from the database, starts a session if the credentials are correct, or returns an error if
they are invalid.
o logout.php: This PHP file handles the logout functionality: it ends the current user
session by destroying it and redirects the user to the public home page.
o public_home.php: This PHP file manages the homepage functionality: it initializes a
session, sets a default username as 'Guest' if no user is logged in, and dynamically
loads the homepage content using templates.
o public_list_questions.php: This PHP file retrieves and displays a list of questions
from the database, with optional search functionality, and handles errors gracefully.
o register.php: This PHP file handles user registration by validating input, checking for
duplicates, hashing passwords, and storing user data in the database, with error
handling included.
o style.css: This CSS defines a clean, responsive design with styles for layout, sidebar,
content, forms, and footer, emphasizing modern aesthetics and usability.
• PHP and PDO are used to validate the login credentials. Users are sent to the relevant
dashboard upon successful login. Students are redirected to “user/home.php,” while
administrators are redirected to “admin/admin_home.php.”
Question Management:
• Users can add new questions with details such as title, content, select modules, and
optionally upload images through “Add_question.php.”
• Two pages are used to handle and show the questions: “list_question.php” (which shows
all questions from all students in the forum) and “my_questions.php” (which shows all
questions from the logged-in student).
• Only the question owner can edit or delete their question and cannot edit questions from
other students.
Admin Functions:
• Administrators can manage users by viewing their information, deleting users, and
adding, editing, or deleting modules.
• The “manage_user.php” page provides options to view the list of users and delete users
from the list.
Database Communication:
• PHP programs use PDO functions to communicate with the MySQL database.
• The database connection is created using the "DatabaseConnection.php" file.
• Data management and querying capabilities are included in the "DatabaseFunction.php"
file.
With an emphasis on components, processes, and important security and maintenance issues,
this overview offers a high-level knowledge of the Question Forum system's design.
5.3 Design of User Interfaces
The interface design prioritizes simplicity and clarity, following the principles outlined by
Krug (2014) in his seminal work on usability, Don’t Make Me Think. The home page presents a
clean layout with a list of questions displayed in reverse chronological order, ensuring that the
most recent queries are easily accessible.
Navigation is structured to provide an intuitive user journey. Users can seamlessly transition
between viewing questions, posting new content, and managing their profiles through a
persistent navigation bar. The contact page, designed for student-administrator communication,
incorporates form validation to minimize errors during submission.
To ensure cross-device compatibility, the front end is built using Bootstrap, a widely adopted
CSS framework known for its responsive grid system (Bootstrap Documentation, 2023).
When you first access the website, this is the first page that users will see, the page for
others, it is a simple interface including the page name “GUEST” and the welcome sentence
when accessing “Welcome to the question forum” – the functions that guests can access are to
view the list of all questions of all students but are limited in editing rights. There are 2 more
login sections for students and administrators for users to enter login information
Figure 3: Page that displays a list of questions for guest
Above is the page that displays the list of questions that visitors can see, this page includes
the page name "List question" displayed prominently at the top and then the list of questions
including "title, body or content" and displays the image of the question if any. In addition, it
also displays module information, time of posting the question and the owner of the question.
For this page, visitors only have the right to view and cannot perform operations to edit question
information.
Above is the login page for students. The interface of the page is similar to other pages
including the title "login" displayed prominently at the top, below is the email text and Password
for users to enter information. After clicking the Login button, the student's home page will be
displayed if the account is accurate; if not, an error notice will show and the user will be
prompted to input the data again. In case the user does not have an account, click on the blue text
"Register here" to create a new account.
Above is the login page for administrators. The interface of the page is similar to the login
page for students, including the title "login" displayed prominently above, below is the email text
and Password for users to enter information. If the account is accurate after clicking the Login
button, the user will be sent to the administrator's home page; if not, an error notice will show
and they will be prompted to input their information again.
Above is the home page for users when they successfully log in. It is similar to other home
pages including the page name "User" displayed in large blue letters at the top left and the
welcome title "Welcome to the question forum"
Figure 8: Forum question list page
Above is the page that displays a list of all questions posted by all students on the forum.
This page includes the title "List Questions" displayed at the top. Next is the question search
toolbar and below is a list of questions including information such as title, body, module, poster,
posting time and if there is an image it will also be displayed in each question. On this page,
users do not have the right to edit information or delete questions of other users, but if it is a
question of that user, they can perform the editing or deleting operation.
Above is the page that displays a list of all the questions of that user, it also includes the same
information fields as image number 8. and on this page the user can edit the information or delete
one or more questions because all the questions in this list are from that user.
Figure 10: New question addition page
Above is the question addition page. This page displays the title "Add Questions" on the
top and below are the boxes for entering the information of the question that the user wants to
add, including title, content, select module and add image if desired. The question will be
instantly added to the list when the user fills out all the fields and clicks the submit button. If the
information boxes are not filled in, an error will be displayed and a notification will be displayed
that the information has been entered completely.
Above is the page to send questions or requests to the administrator. The interface of the
page displays the title "Requeust or Ask To Admin" on the top and below is the box to enter the
request information to the administrator. When you click the Submit button, the request will be
sent directly to the administrator. Below is a list of the history of requests that students have sent,
if the administrator responds, it will be displayed here.
Above is the page displaying user information. This page includes the title "Profle"
displayed at the top and below are user information boxes such as Username, Email, Full Name,
Address, About, Company. In which the Username and Email information is displayed directly
because it takes information when you have registered a new account through the database
storage system and with the remaining boxes, you will fill in yourself. The information on the
user can be changed and updated regularly.
Figure 13: Modules information display page
Above is the page that displays all the list of modules including the title "All Modules"
displayed prominently at the top and below is the list of modules and information, concepts of
each module.
This is the admin home page if they log in successfully. The interface is similar to the other
pages so I won't say more to avoid repeating too much duplicate information.
Above is the page that displays the list of requests sent from all students. The current interface
displays the title "List request" and below is the list of student requests and the administrator can
reply or delete one or all of the requests displayed in this list.
Tools for managing the system's modules are available on the Module Manager page. It
enables the administrator to see the modules that are currently in use as well as the conceptual
details of each module. It is within the administrator's power to add, amend, and remove
descriptive information. Tailwind CSS guarantees a constant and eye-catching appearance across
devices, and the design is straightforward and easy to use.
VI. THE IMPLEMENTATION
6.1 Includes folder
The PHP code fragment connects to a MySQL database named database1841 using PDO
with the server set to localhost, username root, and an empty password. The utf8mb4 charset
ensures support for various characters, while PDO provides features like prepared statements and
error handling, allowing the program to perform dependable and safe SQL operations.
This PHP script handles adding new modules to a database using a POST request. If the
form is submitted, it retrieves the module_name and module_description from the POST data,
and inserts them into the modules table using a prepared statement for security. The user is sent
to the module list page (module.php) upon successful insertion. If required fields are missing or
an error occurs, it shows an error page with a relevant message. For GET requests, the script
displays a form to add a module using the add_module.html.php template. The layout is
wrapped with user_layout.html.php for consistent styling.
Figure 22: admin_home.php
This PHP script initializes a session and ensures a username session variable is set. If
username is not already defined, it defaults to "Guest." The script sets a page title (Home), uses
output buffering to include the home.html.php template, and stores the output in the $output
variable. Finally, the content is wrapped with the admin_layout.html.php template for
consistent layout and display.
This PHP script deletes a question from the database by its id, which is passed via the query
string. It starts a session, employs a prepared DELETE SQL query and establishes a connection
to the database with id parameter to execute the deletion securely. If successful, it redirects to the
list_questions.php page. In case of an error, it sets an error message and includes the
admin_layout.html.php template to show the error.
Figure 26: delete_request.php
Using the id supplied in the URL, this PHP script removes a particular request from the
request_to_admin database. It creates a database connection and launches a session. It prepares
and runs a DELETE SQL query to delete the request from the database if the id is valid (higher
than ,0) Afterward, it redirects to the list_request.php page. If an error occurs, it catches the
exception and displays an error message using the admin_layout.html.php template.
Figure 27: delete_user.php
This PHP script deletes a user from the users table based on the id passed in the URL. It
starts a session and includes the database connection. The script retrieves the user ID, ensures it's
an integer, and prepares a DELETE SQL query to remove the corresponding record from the
database. After the deletion, it redirects to the manage_user.php page (which lists users). If an
error occurs during execution, it catches the exception and displays an error message using the
admin_layout.html.php template.
Figure 28: edit_module.php
This PHP script allows an admin to edit module details. By confirming the session, it
determines whether the administrator is logged in. The script retrieves the current module data if
the id is supplied in the URL, then allows the admin to update the module name and description.
Upon successful submission, it updates the database and redirects to the module list page. If the
module name is empty or the update fails, an error is displayed. The script uses prepared
statements for database queries and renders the edit_module.html.php template for the admin
interface.
Figure 29: list_questions.php:
This PHP script handles searching and displaying questions for an admin. It starts by
checking if a search query (search) is provided in the URL. If a search term is present, it
appends a WHERE clause to filter questions based on the title, body, or module. The script uses
prepared statements to prevent SQL injection. If a search is conducted, the LIKE operator
matches any questions containing the search term. After executing the query, it fetches all
matching results and stores them in an array. The results are then displayed using the
admin_list_question.html.php template, which is included in the admin layout.
Figure 30: list_request.php
A list of queries that users have sent to the administrator is retrieved and shown by this PHP
script. First, a session is created and the required database connection file is included. After that,
a SQL query is prepared and run to retrieve every entry from the request_to_admin table,
ordered by the asked_at timestamp in descending order. If the query is successful, the results are
stored in the $questions array. If there's an error, it catches the exception and stores an error
message. Finally, the script prepares the page by including the list_request.html.php template to
display the results within the admin layout.
Figure 31: manage_user.php
A list of every user is retrieved and shown by this PHP script from the database. First, the
database connection file is included and a session is established. After that, it tries to run a query
to pick every user from the users table and arrange them in decreasing order by the created_at
date. The results are stored in the $users array. If an error occurs during this process, the
exception is caught, and an error message is displayed within the admin_layout.html.php
template. If the query is successful, the script prepares the page and includes the
manage_user.html.php template to show the user data within the admin layout.
Figure 32: module.php
A list of every module is the database and shown in the admin panel using this PHP script.
Initializing a session and adding the required function files and database connection are the first
steps. The script then queries the modules table to fetch all the modules. If modules are found,
they are stored in the $modules array; if none are found, an empty array is assigned. The script
prepares the manage_module.html.php template to display the module list and stores the output
in the $output variable. An error message is shown if there is a problem with the process. Lastly,
the admin_layout.html.php template for the admin view contains the content.
6.3 User Folder
This PHP script allows authenticated users to submit a new question. It checks for required
fields (question_title, question_body, question_module), handles optional image uploads, and
inserts the question into the database. If successful, the user is redirected with a success message,
otherwise, an error is shown. If the request is a GET, available modules are fetched for the form.
Figure 34: delete_comment.php
This PHP script allows a logged-in user to delete their comment. It checks if the user is
logged in and if they own the comment by verifying with the database. If valid, the comment is
deleted, and the user is redirected to list_question.php. If the user does not own the comment, an
error message is shown. If no comment_id is provided, It takes the user to list_question.php.
Figure 35: delete_question.php
Logged-in user to delete their question along with its associated image (if it exists). The
script checks if the user owns the question by verifying the user_id and question_id in the
database. If an image is linked to the question, it is deleted from the server before the question
itself is deleted. After the deletion, It takes the user to list_questions.php. An error notice
appears if there is a problem..
Figure 36: edit_question.php
This PHP script allows a logged-in user to edit a question. It handles POST requests to
update the question's title, body, and image. If an image is uploaded, it’s saved to the server. The
current image will be deleted if the user wishes to do so. After updating the question, the script
redirects the user to the question list page. If the request is GET, it fetches the current question
data to display in the edit form. Errors are shown if the user has no permission or if there are
issues with the update.
Figure 37: home.php
This PHP script checks if a session for the user is active. If not, it sets a default session value
of 'Guest' for the username. The script then sets the title to 'Home', retrieves the content from
home.html.php into an output buffer, and includes the user_layout.html.php template, which
will display the page with the appropriate layout for the user.
This script handles a user's profile update by starting a session, verifying the user is logged
in, and processing POST data to update their profile using updateUserProfile. It fetches the
current user's data with getUserById, displays it via the profile.html.php template, and saves
changes back to the database. After successful updates, it refreshes the session data, shows a
success message, and redirects to the profile page.
Figure 42: request_to_admin.php
This script manages user interaction with an admin question system. It starts a session,
ensures the user is authenticated, and processes submitted questions via a POST request to insert
them into the request_to_admin table. It retrieves the user's previous questions, ordered by
asked_at, and displays them using the request_to_admin.html.php template. In case of
database errors, it captures and displays appropriate error messages. Finally, the page layout is
rendered with user_layout.html.php.
6.4 public files
This script handles admin login by verifying credentials via a POST request; it queries the
database for a matching email and compares the plain-text password. On success, admin details
are stored in the session, redirecting to admin_home.php; otherwise, an error is displayed. Note:
Use secure password hashing methods instead of plain-text storage.
Figure 44: adminstyle.css
This CSS defines a visually appealing layout with a fixed-width sidebar for navigation and a
responsive content area. The sidebar has a dark theme, rounded links that change color on hover,
and a distinctive blue header for emphasis. The content area is clean, centrally styled, with
rounded corners and a subtle shadow. Responsive design ensures the layout adapts seamlessly for
smaller screens by making the sidebar full-width and removing its fixed position. Footer styling
complements the sidebar, maintaining consistency.
Figure 45: index.php
This PHP script includes the content of public_home.php into the current file. It acts as a
simple entry point or dispatcher, likely pulling in the main layout or content for a public-facing
home page.
This PHP script is used for logging out a user. It starts by calling session_start() to access
the current session. Then, it calls session_destroy() to end the session, essentially terminating
the user's session. The header() method is used to redirect the user to the public_home.php
page when the session has been terminated. The user is guaranteed to be logged out and taken to
the public home page using this script.
This PHP script starts a session, sets a default 'Guest' username if not already set, and loads
the home page content using the home.html.php template, which is wrapped in a main layout.
Figure 49: public_list_questions.php
The PHP script starts a session, includes the database connection, and attempts to fetch all
questions from the database (with an optional search filter). It displays the results in a template
public_list_questions.html.php, wrapped in a main layout. If any error occurs, an error message
is shown.
Figure 50: register.php
The PHP script handles user registration by verifying the submitted data. It checks if the
passwords match and if the username or email is already in use. If the validations pass, it hashes
the password and inserts the user into the database. If any error occurs (like database issues or
conflicting data), an error notice appears. The user is taken to the login page after completing the
registration process. The form and content are included in a layout template.
Figure 51: style.css
This CSS provides a clean, modern layout with a fixed sidebar, content area, and form
styles. It uses a gradient background for the body, with a fixed sidebar featuring white text and
hover effects on links. The content section is styled with padding, a box-shadow, and rounded
corners. Forms are designed with spacious inputs and a blue submit button that changes color on
hover. The footer has a matching background and centered text. The overall design ensures
readability and a consistent, responsive user interface.
VII. DISCUSSION ABOUT GDPR
The system adheres to WCAG 2.1 accessibility standards, integrating features like keyboard
navigation, high-contrast schemes, and descriptive alt texts to ensure inclusivity. The growing
demand for accessible educational technologies, highlighted by a 2022 The Guardian article,
emphasizes the need for compliance. Regarding data protection, the system follows GDPR by
encrypting sensitive data and offering users control over their information, in line with the "right
to be forgotten." The ICO (2023) stresses the importance of transparency in data usage, which
the system addresses with clear privacy policies.
Rights of Users
Security of Data
• Data Minimization: Only gather the information required to run the system.
• Retention Policies: Establish and implement guidelines to prevent retaining data for
longer than necessary.
The solution will guarantee compliance and successfully preserve user privacy by
incorporating these GDPR principles.
The system’s back end is built using PHP PDO, chosen for its secure and efficient interaction
with the MySQL database (PHP.net, 2023). Unlike the procedural MySQLi, PDO provides
robust support for prepared statements, mitigating risks associated with SQL injection attacks.
HTML5 and CSS3 form the backbone of the front-end design, enhanced by Bootstrap for
consistency and ease of customization. JavaScript is employed for client-side validation,
ensuring a smoother user experience by catching errors before submission.
VIII. TESTTING
Unit tests for individual components and integration tests for end-to-end processes were
among the testing approaches used. Manual testing was also conducted to evaluate usability, a
critical metric highlighted in Duckett (2014).
A welcome
Verify the user's Successful .If the
message appears
Login login using the outcome matches.
1 on the home page
Student appropriate Otherwise: "Invalid
when the user is
credentials. email or password"
routed.
A welcome
If the results match, the
Verify the admin message appears on
Login for test is successful.
2 login using the the home page
Admin "Invalid email or
right information. when the user is
password" else.
routed.
Go to Manage Successfully
Edit of If the results match, the
5 Modules and correct the module
Module test is successful.
select "Edit." and description
Test successfully,
Delete Click “Delete” in Delete a user
6 return student list page,
students Manage Student successfully
update the list again
Click “Answer” in
Answer list massage. Submit a successful
7 Enter answer, Test successfully
request reply
click button
“save”
Test successfully,
Delete Click “Delete” in Delete a request return to the list
8
request list massage. successfully message page and
update the list again
IX. CHALLENGES, SOLUTIONS AND RESULTS
9.1 Challenges
a) Frontend and backend integration:
• The challenge is to make sure that the backend PHP scripts and frontend HTML forms
interact efficiently, particularly when managing user input and data uploads.
• Solution: AJAX was used to facilitate data entry and retrieval, and client and server
inputs were verified to guarantee data integrity.
b) Database Schema Adjustments:
• Challenge: Adapting the database schema to the project's changing needs, including
adding new features and fixing problems like missing tables or columns.
• Solution: PDO was used for safe and effective database interactions, and database queries
and schema were updated to reflect the modifications.
c) Debugging and Error Handling:
• Managing errors like "Column not found" or improper redirection that affected the web
application's operation was a challenge.
• Solution: PHP scripts were debugged and fixed to guarantee that database operations and
redirection logic were handled correctly.
d) Usability and Design of User Interfaces:
• The challenge is to leverage Tailwind CSS to create an intuitive user experience while
keeping it looking polished and professional.
• Solution: Based on feedback, Tailwind CSS was successfully used to produce the
intended design aesthetics and enhanced usability.
e) Examining functionality:
• The challenge is making sure that every feature—such as module administration, question
management, and login—functions well and satisfies user needs.
• Solution: Detailed test cases, including edge cases and error situations, were created to
verify every functionality.
9. 2 Results
a) Successful connection: Data submission and retrieval were made possible by the
frontend and backend's smooth connection. Scripts for backend processing are now
properly connected to forms.
b) Database Schema Update: The required tables and columns were added to the database
schema. Features like adding, editing, and removing modules and questions function as
planned.
c) Better Error Handling: By implementing efficient error handling, the application's
resilience was increased and the frequency of frequent mistakes was decreased.
d) Improved User Interface: The program is now aesthetically pleasing and easy to use
after the user interface was improved to satisfy the design requirements.
e) Verified Features: Every significant feature was examined and verified. Test cases
validated that the program functions as intended and gracefully resolves failures.
9.3 Discussion
a) Frontend and Backend Integration: The integration procedure made clear how crucial
it is to provide seamless frontend and backend connectivity. Data integrity and user
experience depend on efficient error handling and validation.
b) Database Schema Modifications: The necessity of schema modifications highlighted
how crucial it is to plan database structure beforehand and be ready to make
modifications when needs change. The application's operation and stability depend on
proper schema maintenance.
c) Debugging and Error Handling: Finding and fixing faults provide important
information about typical problems encountered throughout development. Having a
strong error-handling system is essential for creating dependable online apps.
d) Usability and User Interface Design: The design process reinforced the need of
developing an interface that is both aesthetically attractive and easy to use. A significant
tool for getting the required appearance and experience while preserving design
coherence was Tailwind CSS.
e) Functionality Testing: The thorough testing methodology made sure the program
satisfies user needs and operates as planned. Delivering a high-quality product requires
routine testing and validation.
All things considered, the project effectively overcame the difficulties encountered during
development, resulting in a functional and intuitive online application. The outcomes show how
successful the solutions were and offer a strong basis for further improvements.
Moreover, the system incorporates modern design principles, emphasizing usability and
inclusivity. This aligns with best practices outlined by Krug (2014) in his discussion of effective
user experience design. The application also addresses security concerns by implementing
encrypted password storage and structured validation processes, mitigating risks such as
unauthorized data access, a frequent issue identified in educational applications (Heater, 2023).
However, the project is not without its limitations. The absence of advanced authentication
methods, such as OAuth or multi-factor authentication, poses a potential security gap.
Additionally, the current system does not provide real-time collaboration features or advanced
analytics, which are becoming increasingly essential in modern educational platforms (The
Guardian, 2022). These limitations provide avenues for future enhancements and optimization.
10.2 Recommendations
To improve the system and expand its functionality, the following recommendations are
proposed:
These recommendations not only address the limitations of the current system but also align
with emerging trends in educational technology. By implementing these changes, the platform
can evolve into a comprehensive tool that fosters collaboration, improves accessibility, and
ensures data security.
XI. REFERENCES
1. BBC. (2022). Post-pandemic EdTech Growth. Available at: [Google Scholar].
3. Duckett, J. (2014). HTML & CSS: Design and Build Websites. Wiley. Available at:
[Google Scholar].
4. Heater, B. (2023). Educational App Security Flaws. TechCrunch. Available at: [Google
Scholar].
5. ISO. (2019). Web Accessibility Standards (ISO 40500). Available at: [Google Scholar].
7. Krug, S. (2014). Don't Make Me Think, Revisited. New Riders. Available at: [Google
Scholar].
9. Newman, D. (2022). The Ethics of Software Development. Forbes. Available at: [Google
Scholar].
10. The Guardian. (2022). Accessibility in Education Technology. Available at: [Google
Scholar].
11. O’Reilly Media. (2023). OAuth 2.0 and Modern Authentication. Available at: [Google
Scholar].
12. AWS Documentation. (2023). Best Practices for Database Scalability. Available at:
[Google Scholar].
13. Forbes. (2022). Trends in Educational Mobile Applications. Available at: [Google
Scholar].