SWDW_Fruit_Store/login/interfaces/login_seller.php
2025-06-06 17:14:52 +08:00

31 lines
1.2 KiB
PHP

<html>
<head>
<title>Seller</title>
<link rel="stylesheet" href="./profile.css" type="text/css" />
</head>
<body>
<div id="area">
<img src="../../icon/seller.svg">
<h2 style="margin: none;">
<?php
include '../../indexes/ConnectDB.php';
session_start();
echo $_SESSION['username'];
?>
</h2>
<p>User Type: Seller</p>
<?php
$sql = "SELECT profit FROM seller WHERE name='" . $_SESSION['username'] . "'";
$res = mysqli_query($conn, $sql);
$money = mysqli_fetch_array($res);
?>
<p>Profit: ¥<?php echo $money['profit']; ?></p>
<a href="../../indexes/process/receipt.php" style="text-decoration: none; color: white; background-color: rgba(69, 67, 67, 0.6);
border-top-left-radius: 5px; border-bottom-left-radius: 5px;">My Receipt</a>
<a href="../logout.php" style="text-decoration: none; color: white; background-color: rgba(69, 67, 67, 0.6);
border-top-right-radius: 5px; border-bottom-right-radius: 5px;">Log out</a>
</div>
</body>
</html>