-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
50 lines (40 loc) · 923 Bytes
/
index.php
File metadata and controls
50 lines (40 loc) · 923 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<?php
ini_set('display_errors', 'On');
error_reporting(E_ALL);
?>
<html>
<head>
<title>Login example</title>
</head>
<body>
<h1>Login Example</h1>
<form form action="login.php" method="POST">
<input type="text" name="username" placeholder="Username">
<br>
<input type="password" name="password" placeholder="Password">
<br>
<button type ="submit">Login</button>
</form>
<?php
if (isset($_SESSION['id'])) {
header('Location: logedin.php');
} else {
echo "You are not logged in";
}
?>
<br>
<br>
<br>
<form action="signUp.php" method="POST">
<input type="text" name="first" placeholder="First Name">
<br>
<input type="text" name="last" placeholder="Last Name">
<br>
<input type="text" name="username" placeholder="Username">
<br>
<input type="password" name="password" placeholder="Password">
<br>
<button type ="submit">SIGN UP</button>
</form>
</body>
</html>