Bootstrap HTML Database
Bootstrap HTML Database
Simple website that contains Button menus and dropdown list with submenus
BSIS3 BLOCK3
GROUP-”BYTEWZARD”
Members:
-VINCENT V MORALES
-CHRHISTOPHER JOHN R GURREA
-JOSEPH V MORALES
-JABIN CAJES
-JOHN GABRIEL ABAS
Html Home_page
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>PeepzCafe</title>
<!-- Bootstrap CSS -->
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css"
rel="stylesheet">
<style>
/* Ensure the body takes the full height of the viewport */
html, body {
height: 100%;
margin: 0;
}
/* Allow content area to grow while the footer stays at the bottom */
.container-fluid {
flex: 1;
}
.product-card {
width: 100%;
margin-bottom: 1rem;
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-
scale=1.0">
<title>Checkout - PeepzCafe</title>
<link href="https://cdn.jsdelivr.net/npm/[email protected]
alpha1/dist/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
<hr>
<h4>Payment Method</h4>
<form id="payment-form">
<!-- Payment Method Options -->
<div class="mb-3">
<label for="payment-method" class="form-
label">Choose Payment Method:</label>
<select class="form-select" id="payment-
method" required>
<option value="credit_card">Credit
Card</option>
<option
value="paypal">PayPal</option>
<option value="cash">Cash on
Delivery</option>
</select>
</div>
<script>
// Get the product and price from the URL
const urlParams = new
URLSearchParams(window.location.search);
const productName = urlParams.get('product');
const productPrice = urlParams.get('price');
checkout.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-
scale=1.0">
<title>Checkout - PeepzCafe</title>
<link href="https://cdn.jsdelivr.net/npm/[email protected]
alpha1/dist/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
<hr>
<h4>Payment Method</h4>
<form id="payment-form">
<!-- Payment Method Options -->
<div class="mb-3">
<label for="payment-method" class="form-
label">Choose Payment Method:</label>
<select class="form-select" id="payment-
method" required>
<option value="credit_card">Credit
Card</option>
<option
value="paypal">PayPal</option>
<option value="cash">Cash on
Delivery</option>
</select>
</div>
<!-- User Details -->
<div class="mb-3">
<label for="user-name" class="form-
label">Full Name:</label>
<input type="text" class="form-control"
id="user-name" required>
</div>
<div class="mb-3">
<label for="user-email" class="form-
label">Email Address:</label>
<input type="email" class="form-control"
id="user-email" required>
</div>
<script>
// Get the product and price from the URL
const urlParams = new
URLSearchParams(window.location.search);
const productName = urlParams.get('product');
const productPrice = urlParams.get('price');
<?php
// db.php - Database connection
$host = 'localhost'; // or your server IP
$dbname = 'peepzcafe';
$username = 'root'; // Your MySQL username
$password = ''; // Your MySQL password
try {
// Create the PDO instance
$pdo = new PDO("mysql:host=$host;dbname=$dbname", $username,
$password);
$pdo->setAttribute(PDO::ATTR_ERRMODE,
PDO::ERRMODE_EXCEPTION); // Error handling
} catch (PDOException $e) {
echo 'Connection failed: ' . $e->getMessage();
}
?>