Project's name: Add PDF to CRUD Project - Add PDF to CRUD operations using domPDF
This CRUDProject application is a simple PHP project to create a simple CRUD Web Application for users management. In this project we are adding the PDF export functionality for the Members List and the Member Details pages. It uses PHP version 8.2.12, MariaDB database server version 10.4.32, and an external library called domPDF. This project is part of the Pentatech IT Solutions PHP Internship program.
- Login and Signup forms, developed in the previous project.
- Implementation of session management.
- Implement a dashboard with a list of Users
- Implement CRUD operations for each user (Create, Read, Update, and Delete)
To get a local copy up and running, follow these steps.
In order to run this project you need:
Prerequisites: XAMPP application, including Apache web server, PHP (version 8), and MySQL DB server or MariaDB server. You can use a code editor like Visual Studio Code...
Clone the CRUDProject repo. You can clone this project inside of XAMPP's public folder called htdocs (in Windows C:\xampp\htdocs).
cd C:\xampp\htdocs
git clone https://https://github.com/PentaTech-IT-Solutions/crud_add_pdf_project_jcmunav63
This project requires the following dependencies: the PHP interpreter, the Apache Web Server, a MySQL or MariaDB database server, the dependency manager Composer, and the third-party library called domPDF. The first three components are bundled into XAMPP application (for Windows or Linux). Other similar software applications are WAMP (for Windows), LAMP (for Linux), and MAMP (for Mac). The Composer and the domPDF components are installed using a command terminal.
Create a database using the url "localhost/phpmyadmin" in the browser. The PHPMyAdmin application will open to manage the database server.
You can use the file database/team_management.sql inside of an SQL tab of the PHPMyAdmin application. It contains all the information to set up the database to start using it.
You can call the database something like "crud_project". You can use PHPMyAdmin's graphic interface to create the database and the table.
- Create the crud_project database
- Create a users table (it will contain 6 columns).
- Create each column with the apropriate name, type, size, and other features. Columns are: id, username, fullname, email, password, phonenumber.
- Create the additional tables: members table, to include all the information about each member, and a teams table, if you want to include a name and description for each team.
To run the project, use the browser to enter the following path...
http://localhost/crud_add_pdf_project/index.php
In this home page you will find two links to enter the application, the signup.php form page, if you are not registered yet, or the login.php form page, if you are already registered. http://localhost/crud_add_pdf_project/signup.php
http://localhost/crud_add_pdf_project/login.php
See the images of these two forms below.
After logging in, the user is redirected to a Team members' Dashboard. Here, the user can Create, Read, Update, or Delete (CRUD) a team member.
Here's the form used to Create or Update a team member...
And there's also an option to create a new Team, using the following form. The Read, Update, or Delete operations for Teams are also implemented.
For this project, we added the generation of two PDF reports to export the html content. the first one is the list of members that is displayed in the dashboard, and the second one is a specific details page, selected from the last name's link in the dashboard. The exported file is shown in the dashboard, as a pdf file, and it has a download or a print option for the user.
Here are some example images for these two reports...
- Members list page (dashboard):
- Member details page:
👤 Juan Carlos Muñoz
- GitHub: @jcmunav63
- Twitter: @jcmunav63
- LinkedIn: @juan-carlos-muñoz
- I would like to acknowledge all the support and help from PentaTech-IT-Solutions.
This project is MIT licensed.