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
|
<html>
<head> <title>password protection</title> </head>
<BODY BGCOLOR="#ffffff" LINK="#ff0000" ALINK="#00ffff" VLINK="#999999"> <?php
// Define your username and password $username = "mam"; $password = "mscmks";
if ($_POST['txtUsername'] != $username || $_POST['txtPassword'] != $password) {
?> <p align="center"><font face="Verdana, Arial, Helvetica, sans-serif" size="5">Login</font> </p> <form name="form" method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>"> <div align="center"> <center> <table border="0" cellpadding="5" cellspacing="0"> <tr> <td><label for="txtUsername"><font face="Verdana, Arial, Helvetica, sans-serif" size="3">Username</font></label> </td> <td><input type="text" title="Enter your Username" name="txtUsername" /></td> </tr> <tr> <td><label for="txtpassword"><font face="Verdana, Arial, Helvetica, sans-serif" size="3">Password</font></label> </td> <td><input type="password" title="Enter your password" name="txtPassword" /></td> </tr> </table> </center> </div> <p align="center"><input type="submit" name="Submit" value="Login" /></p> </form>
<?php } else { ?>
<meta http-equiv="refresh" content="0;URL=index.php">
<?php } ?>
</body>
</html>
|