├── logo.png
├── README.md
├── burger1.jpg
├── pizza1.jpeg
├── script.js
├── login.html
├── register.html
├── register.php
├── login.php
├── payment.php
├── style.css
├── order.html
├── profile.html
├── payment.html
├── home.html
└── receipt.html
/logo.png:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # fasty-
2 | This is a online fast food delivery website
3 |
--------------------------------------------------------------------------------
/burger1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sabarnashinchu/fasy-/HEAD/burger1.jpg
--------------------------------------------------------------------------------
/pizza1.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sabarnashinchu/fasy-/HEAD/pizza1.jpeg
--------------------------------------------------------------------------------
/script.js:
--------------------------------------------------------------------------------
1 | function addToCart(item, price) {
2 | let quantity = document.getElementById(item.toLowerCase() + '-qty').value;
3 | let total = quantity * price;
4 | let order = item + " x " + quantity + " = ₹" + total + "\n";
5 |
6 | // Store order and total in localStorage
7 | localStorage.setItem('order', (localStorage.getItem('order') || '') + order);
8 | localStorage.setItem('total', (parseInt(localStorage.getItem('total') || 0) + total));
9 |
10 | // Redirect to order page
11 | window.location.href = 'order.html';
12 | }
13 |
--------------------------------------------------------------------------------
/login.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Fasty - Login
7 |
8 |
9 |
10 | Login
11 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/register.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Fasty - Register
7 |
8 |
9 |
10 | Register
11 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/register.php:
--------------------------------------------------------------------------------
1 | connect_error) {
12 | die("Connection failed: " . $conn->connect_error);
13 | }
14 |
15 | // Retrieve POST data
16 | $user = $_POST['username'];
17 | $pass = $_POST['password'];
18 |
19 | // Insert user into database
20 | $sql = "INSERT INTO users (username, password) VALUES ('$user', '$pass')";
21 | if ($conn->query($sql) === TRUE) {
22 | header("Location: login.html"); // Redirect to login page
23 | } else {
24 | echo "Error: " . $sql . "
" . $conn->error;
25 | }
26 |
27 | $conn->close();
28 | ?>
29 |
--------------------------------------------------------------------------------
/login.php:
--------------------------------------------------------------------------------
1 | connect_error) {
12 | die("Connection failed: " . $conn->connect_error);
13 | }
14 |
15 | $user = $_POST['username'];
16 | $pass = $_POST['password'];
17 |
18 | $sql = "SELECT * FROM users WHERE username='$user' AND password='$pass'";
19 | $result = $conn->query($sql);
20 |
21 | if ($result->num_rows > 0) {
22 | echo "";
26 | } else {
27 | echo "Invalid credentials";
28 | }
29 |
30 | $conn->close();
31 | ?>
32 |
--------------------------------------------------------------------------------
/payment.php:
--------------------------------------------------------------------------------
1 | connect_error) {
12 | die("Connection failed: " . $conn->connect_error);
13 | }
14 |
15 | $card_number = $_POST['card-number'];
16 | $expiry_date = $_POST['expiry-date'];
17 | $cvv = $_POST['cvv'];
18 | $total_amount = $_POST['total-amount'];
19 |
20 | // Insert payment data into the database
21 | $sql = "INSERT INTO payments (card_number, expiry_date, cvv, total_amount) VALUES ('$card_number', '$expiry_date', '$cvv', '$total_amount')";
22 |
23 | if ($conn->query($sql) === TRUE) {
24 | header("Location: receipt.html"); // Redirect to receipt page
25 | } else {
26 | echo "Error: " . $sql . "
" . $conn->error;
27 | }
28 |
29 | $conn->close();
30 | ?>
31 |
--------------------------------------------------------------------------------
/style.css:
--------------------------------------------------------------------------------
1 | body {
2 | font-family: Arial, sans-serif;
3 | margin: 0;
4 | padding: 0;
5 | background-color: #f5f5f5;
6 | }
7 |
8 | header {
9 | display: flex;
10 | justify-content: space-between;
11 | align-items: center;
12 | padding: 10px 20px;
13 | background-color: #333;
14 | color: white;
15 | }
16 |
17 | .logo img {
18 | height: 50px;
19 | }
20 |
21 | .website-name h1 {
22 | margin: 0;
23 | }
24 |
25 | .profile a {
26 | color: white;
27 | text-decoration: none;
28 | }
29 |
30 | main {
31 | padding: 20px;
32 | }
33 |
34 | .menu {
35 | display: flex;
36 | justify-content: space-around;
37 | }
38 |
39 | .item {
40 | text-align: center;
41 | background-color: white;
42 | padding: 10px;
43 | border-radius: 10px;
44 | box-shadow: 0 0 10px rgba(7, 7, 7, 0.879);
45 | }
46 |
47 | .item img {
48 | width: 100px;
49 | height: 100px;
50 | border-radius: 50%;
51 | }
52 |
53 | footer {
54 | text-align: center;
55 | padding: 10px 0;
56 | background-color: #333;
57 | color: white;
58 | position: fixed;
59 | width: 100%;
60 | bottom: 0;
61 | }
62 |
--------------------------------------------------------------------------------
/order.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Fasty - Order
7 |
8 |
9 |
10 |
11 |
12 |

13 |
14 |
15 |
Fasty
16 |
17 |
20 |
21 |
22 | Your Order
23 |
24 | Total Amount: ₹
25 |
26 |
27 |
30 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/profile.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Fasty - Profile
7 |
8 |
9 |
10 |
11 |
12 |

13 |
14 |
15 |
Fasty
16 |
17 |
18 |
19 |
20 |
21 |
22 | Profile
23 | Welcome, !
24 |
25 |
28 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/payment.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Fasty - Payment
7 |
8 |
9 |
10 |
11 |
12 |

13 |
14 |
15 |
Fasty
16 |
17 |
20 |
21 |
22 | Payment
23 | Total Amount: ₹
24 |
34 |
35 |
38 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/home.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Fasty - Home
7 |
8 |
9 |
10 |
11 |
12 |

13 |
14 |
15 |
Fasty
16 |
17 |
20 |
21 |
22 | Welcome to Fasty!
23 |
41 |
42 |
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/receipt.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Fasty - Receipt
7 |
8 |
9 |
10 |
11 |
12 |

13 |
14 |
15 |
Fasty
16 |
17 |
20 |
21 |
22 | Receipt
23 |
24 |
25 |
26 |
29 |
52 |
53 |
54 |
--------------------------------------------------------------------------------