-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
36 lines (36 loc) · 829 Bytes
/
index.php
File metadata and controls
36 lines (36 loc) · 829 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<?php
session_start(); //starts the session
if($_SESSION['user']){
header("location: home.php");// checks if the user is logged in
}
else{
header("location: login.php"); // redirects if user is not logged in
}
$user = $_SESSION['user']; //assigns user value
?>
<html lang="en">
<?php
include "head.php";
?>
<body>
<div class="container">
<header>
<div class="logo" >Indus Shop Database Management</div>
<nav class="float-right">
<div class="pure-menu pure-menu-open pure-menu-horizontal">
<ul>
<li><a href="login.php">Login</a></li>
<li><a href="register.php">Register</a></li>
</ul>
</div>
</nav>
</header>
<?php
echo "<p>Hello World!</p>";
?>
<?php
include "footer.php";
?>
</div>
</body>
</html>