PhpShit/home.php
2024-05-09 08:32:14 +08:00

72 lines
2.2 KiB
PHP

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset='utf-8'>
<meta http-equiv='X-UA-Compatible' content='IE=edge'>
<title>Placeholder Register</title>
<meta name='viewport' content='width=device-width, initial-scale=1'>
<link rel='stylesheet' type='text/css' media='screen' href='style.css'>
</head>
<body>
<header>
<a href="home.php" style="font-family: cursive; color:white; font-size: xx-large; text-decoration: none"> Placeholder</a>
</header>
<div class="login-box">
<h2>Hello, <?php
session_start();
$empID = $_SESSION['EmployeeID'];
$connect = mysqli_connect("localhost", "root", "", "g1_pila") or die("Unable to connect");
if($empID == ''){
header("location:index.php");
}
$sql = "SELECT OWNER FROM store WHERE STORE_ID=$empID ";
$result = mysqli_query($connect, $sql);
$row = mysqli_fetch_assoc($result);
echo $row['OWNER'];
?></h2>
<header>
<nav style="margin-left: 35%">
<table>
<tr>
<th><a href="display.php">
<span></span>
<span></span>
<span></span>
<span></span>Display Table</a></th>
</tr>
<tr>
<th><a href="createUser.php">
<span></span>
<span></span>
<span></span>
<span></span>Create User</a></th>
</tr>
<tr>
<th><a href="Insert.php">
<span></span>
<span></span>
<span></span>
<span></span>Insert</a></th>
</tr>
<tr>
<th><a href="logout.php">
<span></span>
<span></span>
<span></span>
<span></span>Log-off</a></th>
</tr>
</table>
</nav>
</header>
</div>
</body>
</html>
<?php