This commit is contained in:
2024-05-09 10:20:54 +08:00
parent 1242d6e633
commit f01cfaec8c
5 changed files with 40 additions and 63 deletions
+14 -8
View File
@@ -2,7 +2,6 @@
<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'>
@@ -13,16 +12,23 @@
</header>
<div class="login-box">
<?php
session_start();
if (!isset($_SESSION['EmployeeID'])){
header("location:index.php");
}
?>
<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);
try{
$result = mysqli_query($connect, $sql);
}catch (Exception $ex){
echo "<script>alert('Sum Ting Wong'); window.location='index.php';</script>";
}
$row = mysqli_fetch_assoc($result);
echo $row['OWNER'];
?></h2>
@@ -41,14 +47,14 @@
<span></span>
<span></span>
<span></span>
<span></span>Create User</a></th>
<span></span>Create Store</a></th>
</tr>
<tr>
<th><a href="Insert.php">
<span></span>
<span></span>
<span></span>
<span></span>Insert</a></th>
<span></span>Insert Shipment</a></th>
</tr>
<tr>
<th><a href="logout.php">