101 lines
2.6 KiB
PHP
101 lines
2.6 KiB
PHP
<html>
|
|
<head>
|
|
<title>Profile</title>
|
|
<link rel="shortcut icon" href="../../icon/favicon/favicon.ico" type="image/x-icon" />
|
|
<link rel="icon" href="../../icon/favicon/favicon.ico" type="image/x-icon" />
|
|
<link rel="stylesheet" href="../user/home.css?version=1" type="text/css" />
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
|
|
</head>
|
|
<style>
|
|
|
|
#message {
|
|
text-align: center;
|
|
font-size: 24px;
|
|
}
|
|
</style>
|
|
<body>
|
|
|
|
<header>
|
|
<div class="logo">
|
|
<a href="../../index.php"><img src="../../icon/favicon/logo_white.svg" alt="RoamEase"></a>
|
|
</div>
|
|
|
|
<div class="nav-links">
|
|
<a href="../../indexes/user/process/cart.php">Cart</a>
|
|
<a href="../../login/logout.php">Log out</a>
|
|
</div>
|
|
</header>
|
|
|
|
<header>
|
|
<nav>
|
|
<a href="#">
|
|
<img src="../../icon/header/stays.svg" alt="Stays">
|
|
</a>
|
|
<a href="#">
|
|
<img src="../../icon/header/transportations.svg" alt="Transportations">
|
|
</a>
|
|
<a href="#">
|
|
<img src="../../icon/header/foods.svg" alt="Foods">
|
|
</a>
|
|
<a href="#">
|
|
<img src="../../icon/header/attractions.svg" alt="Attractions">
|
|
</a>
|
|
<a href="#">
|
|
<img src="../../icon/header/guiding.svg" alt="Guiding">
|
|
</a>
|
|
</nav>
|
|
</header>
|
|
<div id="message">
|
|
<br><br><br><br>
|
|
<br><br><br><br>
|
|
|
|
<?php
|
|
include "../ConnectDB.php";
|
|
|
|
// Check connection
|
|
if ($conn->connect_error) {
|
|
die("Connection failed: " . $conn->connect_error);
|
|
}
|
|
|
|
$ID = $_POST["buyers"];
|
|
$start=microtime(true);
|
|
$sql = "DELETE FROM user_buyer
|
|
WHERE u_id='$ID'";
|
|
|
|
|
|
$result = $conn->query($sql);
|
|
$end = microtime(true);
|
|
$execution_time = $end - $start;
|
|
if ($result) {
|
|
echo "delete successfully! Running time: ".$execution_time."s";
|
|
// Add a line break for readability
|
|
echo "<br>";
|
|
echo '<a href="home.php">Return home</a>'; // Fixed echo statement
|
|
} else {
|
|
echo "Sorry! nobody coule be found!";
|
|
}
|
|
|
|
// Close the database connection after using it
|
|
$conn->close();
|
|
?>
|
|
<br><br><br><br>
|
|
<br><br><br><br>
|
|
|
|
</div>
|
|
<footer>
|
|
<div class="logo">
|
|
<a href="../../index.php"><img src="../../icon/favicon/textlogo.svg" alt="RoamEase" height="50px"></a>
|
|
<p style="font-size:10%;">©2023 COMP3013 Group10</p>
|
|
</div>
|
|
|
|
<div class="nav-links" style="font-size: 80%;">
|
|
<a href="#" style="color: white; margin: 0 10px;">About us</a>
|
|
<a href="#" style="color: white; margin: 0 10px;">Privacy Policy</a>
|
|
<a href="#" style="color: white; margin: 0 10px;">Terms For Usage</a>
|
|
</div>
|
|
|
|
</footer>
|
|
</body>
|
|
</html>
|