-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
41 lines (41 loc) · 1.12 KB
/
index.php
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
<?php
session_start();
?>
<!DOCTYPE html>
<HTML>
<header>
<link rel="stylesheet" type="text/css" href="style/index.css">
<meta charset="UTF-8">
<title>CAMAGRU</title>
</header>
<body>
<?php include('template/header.php') ?>
<?php include('template/footer.php') ?>
<div id="login">
<div class="title">LOGIN</div>
<div id="box">
<?php if(isset($_SESSION['id'])) { ?>
You are connected as <?php print_r(htmlspecialchars($_SESSION['username'])) ?>
<?php } else { ?>
<form method="post" style="position: relative;" action="controller/login.php">
<label>Email: </label>
<input id="mail" name="email" placeholder="email" type="mail">
<label>Password: </label>
<input id="password" name="password" placeholder="password" type="password">
<input name="submit" type="submit" value=" LOGIN ">
<a href="signup.php">Create account</a>
<a href="forgot.php">Forget password ?</a>
<span>
<?php
if ($_SESSION['error']) {
echo $_SESSION['error'];
}
$_SESSION['error'] = null;
?>
</span>
</form>
<?php } ?>
</div>
</div>
</body>
</HTML>