-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.php
More file actions
63 lines (61 loc) · 1.96 KB
/
Copy pathindex.php
File metadata and controls
63 lines (61 loc) · 1.96 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
51
52
53
54
55
56
57
58
59
60
61
62
63
<?php
session_start();
require("include/connection.php");
require("include/header.php");
?>
<?php
if (isset($_SESSION['error_messages']))
{
foreach($_SESSION['error_messages'] as $error_message)
{
echo "<p>" . $error_message . "<p>";
}
unset($_SESSION['error_messages']);
}
if (isset($_SESSION['success_message']))
{
echo "<p>" . $_SESSION['success_message'] . "</p>";
unset($_SESSION['success_message']);
}
?>
<h2>Login</h2>
<form action="process.php" method="post">
<input type="hidden" name="action" value="login" />
<div class="field_block">
<label for="email">Email:</label>
<input type="text" name="email" id="email" placeholder="Email" />
</div>
<div class="field_block">
<label for="password">Password:</label>
<input type="password" name="password" id="password" placeholder="Password" />
</div>
<input type="submit" name="login" value="Login" />
<h2>Register</h2>
</form>
<form action="process.php" method="post">
<input type="hidden" name="action" value="register" />
<div class="field_block">
<label for="email">Email:</label>
<input type="text" name="email" id="email" placeholder="Email" />
</div>
<div class="field_block">
<label for="first_name">First Name: </label>
<input type="text" name="first_name" id="first_name" placeholder="First name" />
</div>
<div class="field_block">
<label for="last_name">Last Name: </label>
<input type="text" name="last_name" id="last_name" placeholder="Email" />
</div>
<div class="field_block">
<label for="password">Password:</label>
<input type="password" name="password" id="password" placeholder="Password" />
</div>
<div class="field_block">
<label for="confirm_password">Confirm Password:</label>
<input type="password" name="confirm_password" id="confirm_password" placeholder="Confirm password" />
</div>
<input type="submit" name="register" value="Register" />
</form>
</div>
</body>
</html>