0% found this document useful (0 votes)
10 views1 page

PHP Homework 2

The document outlines the creation of a simple user management web application using PHP and MySQL, enabling users to perform CRUD operations. It details the database setup, including the creation of a `user_management` database and a `users` table, as well as the PHP file structure for handling database connections and user interface. Additionally, it includes requirements for user interaction through forms for adding, editing, and deleting users, along with testing guidelines and optional feature extensions.

Uploaded by

olieee.2023
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views1 page

PHP Homework 2

The document outlines the creation of a simple user management web application using PHP and MySQL, enabling users to perform CRUD operations. It details the database setup, including the creation of a `user_management` database and a `users` table, as well as the PHP file structure for handling database connections and user interface. Additionally, it includes requirements for user interaction through forms for adding, editing, and deleting users, along with testing guidelines and optional feature extensions.

Uploaded by

olieee.2023
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Exercise: Simple User Management System‬

‭bjective:‬
O
Create‬ ‭
‭ a‬ ‭
simple‬ ‭
web‬ ‭
application‬ ‭
using‬ ‭
PHP‬ ‭
and‬ ‭
MySQL‬ ‭
that‬ ‭
allows‬
users to perform CRUD operations on a list of users.‬

Requirements:‬

1. Database Setup:‬

- Create a MySQL database named `user_management`.‬

-‬ ‭
‭ Inside‬ ‭
this‬ ‭
database,‬ ‭
create‬ ‭
a‬ ‭
table‬ ‭
called‬ ‭̀users`‬ ‭
with‬ ‭
the‬
following columns:‬

- `id` (INT, AUTO_INCREMENT, PRIMARY KEY)‬

- `name` (VARCHAR(100))‬

- `email` (VARCHAR(100))‬

- `created_at` (TIMESTAMP, default to current timestamp)‬

2. PHP Setup:‬

- Create a PHP file `db.php` to handle the database connection.‬

-‬‭
‭ Create‬‭
a‬‭
main‬‭
PHP‬‭
file‬‭
named‬‭̀index.php`‬‭
that‬‭
will‬‭
serve‬‭
as‬‭
the‬
interface for managing users.‬

3. Interface:‬

-‬ ‭
‭ Home‬ ‭
Page‬ ‭
(`index.php`):‬ ‭Display‬‭a‬‭
list‬‭ of‬‭
all‬‭users‬‭from‬‭ the‬
‭̀users` table with options to Edit or Delete each user.‬
-‬‭
‭ Add‬‭User‬‭Form:‬‭ Include‬‭
a‬‭form‬‭at‬‭
the‬‭top‬‭of‬‭
the‬‭page‬‭to‬‭
add‬‭ a‬
new user (Name and Email).‬

-‬‭
‭ Edit‬‭
User‬‭ Form:‬‭When‬‭
the‬‭user‬‭
clicks‬‭the‬‭Edit‬‭link,‬‭
they‬‭should‬
be able to update the selected user’s Name and Email.‬

-‬ ‭
‭ Delete‬ ‭User:‬ ‭
When‬ ‭
the‬ ‭
user‬ ‭
clicks‬ ‭
the‬ ‭
Delete‬ ‭link,‬ ‭
the‬ ‭
user‬
should be removed from the database.‬

4. Testing:‬

-‬ ‭
‭ Test‬ ‭
the‬ ‭
application‬ ‭
by‬ ‭
adding‬ ‭
multiple‬ ‭
users‬ ‭
and‬ ‭performing‬
CRUD operations.‬

-‬ ‭
‭ (Optional):‬ ‭Extend‬ ‭
the‬ ‭application‬ ‭
by‬ ‭
adding‬ ‭features‬ ‭like‬
form‬
‭ validation,‬
‭ search‬
‭ functionality,‬
‭ and‬
‭ user‬

authentication.‬

Ali Mantache - Full Stack Developer Instructor - 2024‬


‭ 1‬

You might also like