-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
41 lines (38 loc) · 783 Bytes
/
index.php
File metadata and controls
41 lines (38 loc) · 783 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
<html>
<head>
<title>Index Page</title>
<link rel="stylesheet" href="includes/css/bootstrap.css">
<style>
body
{
margin: 5px;
}
</style>
</head>
<body>
<h1>Click Capture! Login to continue.</h1>
<form method="POST" action="">
<input type="text" placeholder="Username" name="username">
<br><br>
<input type="password" placeholder="Password" name="password">
<br><br>
<input type="submit" value="Login" name="submit" class="btn btn-large">
</form>
<p>Psst... Login credentials: <br>user user123</p>
</body>
</html>
<?php
if(isset($_POST['submit']))
{
$userid=$_POST['username'];
$pass=$_POST['password'];
if($userid=='user' && $pass == 'user123')
{
session_start();
$_SESSION['userid']='user';
header('Location: user_dashboard.php');
}
else
header('Location: index.php');
}
?>