Project's status: finished ✔️
This project's purpose is to use basic PHP and MySQL knowledge to build a video game blog where signed-up users can create, read, update and detele entries about their favorite video games. At the same time, if a certain category isn't set yet, they can create it and make it available for everyone to use it, as well as, the registered users can modify their profile information. Those features were developed by using tools such as Dia for making the database schemas and HeidiSQL for exporting under some standars the database coded on the MySQL Command-Line.
1. CSS
2. Dia
3. HeidiSQL
4. HTML5
5. MySQL
6. PHP
-
The table names are in plural and lowercase.
E.g: users.
-
The column names are fully human-readable, in order to make that possible the names are in singular and use camelCase naming practice followed by an underscore and then the first three letters of the table's name where each column belongs to.
E.g: userName_use. This is a column that belongs to a table called "users".
-
The primary key column names use as default name "ID" followed by an underscore and then the first three letters of the table's name where each primary key column belongs to.
E.g.: ID_use. This is a primary key column that belongs to a table called "users".
The 1st schema shows the tables that are in the database and how they are related to each other through one-to-many relationships.
The 2nd schema show the tables thar are not related with each other in the database, these have as main function to backup all the data from the related tables.
The about me layout shows information about the site owner.
The category layout is used to show all the entries from a particular category.
The contact me layout displays the contact information for the site owner.
The create category layout presents a form to create a category.
The create entry layout presents a form to create an entry.
The edit profile layout shows a form to update the user's profile information.
The home page layouts displays the last 5 entries.
The signed in layout is the first page a user gets once is signed in.
The categories_backup_trigger inserts into the categories_backup table all the record's data before being deleted from the categories table.
DELIMITER //
CREATE TRIGGER categories_backup_trigger BEFORE DELETE ON categories FOR EACH ROW
BEGIN
INSERT INTO categories_backup VALUES(OLD.ID_cat, OLD.name_cat);
END//
DELIMITER ;
The entries_backup_trigger inserts into the entries_backup table all the record's data before being deleted from the entries table.
DELIMITER //
CREATE TRIGGER entries_backup_trigger BEFORE DELETE ON entries FOR EACH ROW
BEGIN
INSERT INTO entries_backup VALUES(OLD.ID_ent, OLD.ID_use, OLD.ID_cat, OLD.title_ent, OLD.description_ent, OLD.date_ent);
END//
DELIMITER ;
The users_backup_trigger inserts into the users_backup table all the record's data before being deleted from the users table.
DELIMITER //
CREATE TRIGGER users_backup_trigger BEFORE DELETE ON users FOR EACH ROW
BEGIN
INSERT INTO users_backup VALUES(OLD.ID_use, OLD.name_use, OLD.surname_use, OLD.email_use, OLD.password_use, OLD.date_use);
END//
DELIMITER ;
This file is used to connect to the database.
This file stores the footer module.
This file stores the header module.
This file stores a set of functions that are implemented in the code.
This file stores a redirection action.
This file stores the modules of search box, sign in and sign up.
Copyright © 2021 David Lozada