-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.php
More file actions
50 lines (40 loc) · 1.38 KB
/
index.php
File metadata and controls
50 lines (40 loc) · 1.38 KB
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<?php
require 'header.php';
session_start();
?>
<section class="main-container">
<div class="main-wrapper">
<H2></H2>
<h1></h1>
<?php
if (isset($_SESSION['u_id'])) {
echo "You are logged in!";
}
?>
<?php
if (isset($_SESSION['u_id'])) {
echo '<form action="includes/logout.inc.php" method="POST">
<button type="submit" name = "submit">Logout</button>
</form>';
} else {
echo '<br/></br></br>
<h1>SIGN IN</h1>
<BR/>
<BR/>
<BR/>
<form action="includes/login.inc.php" method="POST">
<h4>username/email: </h4><input type="text" name="uid" >
<br/>
<h4>password: </h4><input type="password" name="pwd" >
<button type="submit" name="submit">Login</button>
</form>
<br/>
<h8>dont have an account? <a href="signup.php">create here</a></h8>
';
}
?>
</div>
</section>
<?php
require 'footer.php';
?>