Skip to content

This repository lists the source code for a simple website for ordering sandwiches at the new sandwich shop at TU Dublin, Grangegorman Campus.

Notifications You must be signed in to change notification settings

DylOSSW/tud_sandwich_shop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TUD Sandwich Shop

Author: Dylan Holmwood
Student Number: D21124331
Date: 14, December 2023
Module: Open-source Software (OSSW4604)
Lecturer: Dr. Ali Malik

Description

This project implements a simple web application for ordering sandwiches online. Users can customize their sandwiches by selecting bread, filling, toppings, and condiments. The order details are processed using PHP and stored in a MariaDB database using SQL.

Table of Contents

  1. Homepage (index.html)
  2. Order Confirmation (process_order.php)
  3. Styles (styles.css)
  4. Technologies Used
  5. File Structure
  6. Usage
  7. Database Setup
  8. Known Issues
  9. Acknowledgments
  10. Contact Information
  11. Project Status

Homepage (index.html)

The index.html file serves as the homepage for TUD Sandwich Shop. Users can submit sandwich orders through a form. The form captures details such as customer name, choice of bread, filling, toppings, and condiments.

Order Confirmation (process_order.php)

The process_order.php file handles form submissions from index.html. It retrieves user preferences, calculates the order total using PHP, and stores the details in a MariaDB database using an SQL statement.

Styles (styles.css)

The styles.css file provides styling for HTML pages, ensuring a visually appealing and responsive design.

Technologies Used

  • HTML: Used for structuring the webpage and capturing user input.
  • CSS: Responsible for styling and ensuring a user-friendly interface.
  • PHP: Powers the server-side logic for processing orders.
  • MariaDB: A relational database management system storing order details.
  • SQL: Utilized to create and manage the database schema.

File Structure

|-- index.html |-- process_order.php |-- styles.css |-- tud_logo.png

Database Setup

  1. Create a MariaDB database named TUD_Sandwich_Shop.
  2. Execute the SQL script in database.sql to set up necessary tables.
  3. Use the following SQL statement to create the table and necessary fields: -- Table structure for the 'orders' table CREATE TABLE orders ( id INTEGER UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, name VARCHAR(255), bread VARCHAR(50), filling VARCHAR(50), topping VARCHAR(50), condiment VARCHAR(50), price DECIMAL(5, 2) );

Usage

  1. Open index.html in a web browser.
  2. Complete the sandwich order form.
  3. Submit the form to place an order.

Known Issues

  • Orders with special characters may not be processed correctly.
  • Users cannot select more than one topping/condiment (option to select more should be added).
  • User cannot see how much the sandwich will cost until submit the form.

Acknowledgments

  • Thanks to Dr. Ali Malik for guidance.

Contact Information

For questions or issues, contact [email protected]

Project Status

This project is actively maintained.

About

This repository lists the source code for a simple website for ordering sandwiches at the new sandwich shop at TU Dublin, Grangegorman Campus.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published