-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathnew.php
More file actions
71 lines (52 loc) · 1.38 KB
/
new.php
File metadata and controls
71 lines (52 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<!DOCTYPE html>
<html>
<head>
<title>login form</title>
<link rel="stylesheet" type="text/css" href="css.css">
</head>
<body>
<center>
<div class="container">
<form id="admin" method="POST" action="new.php">
<div class="header">
<h3 align="center">Admin Login</h3>
</div>
<div class="sep"></div>
<div class="inputs">
<h3>username:</h3>
<input type="text" value="" name="username" />
<h3>password:</h3>
<input type="password" value="password" name="password" />
<div class="checkboxy">
<input name="checky" id="checky" value="1" type="checkbox" />
<label class="terms">remember me</label>
</div>
<input type="submit" id="submit" value="login" name="submit"></input>
</div>
</form>
</div>
</center><br>
<center>
<a href="login.php">Users Login</a><br><br>
<a href="guest.php">Guest Login</a>
</center>
<?php
if (isset($_POST['submit']))
{
$username=$_POST['username'];
$password=$_POST['password'];
if(!empty($username )&& ($password))
{
if($username=="sawe" && $password=="1234")
{
header("location:index.php");
}else{
echo "invalid username";
}
}else{
echo "username cannot be blank";
}
}
?>
</body>
</html>