-
Notifications
You must be signed in to change notification settings - Fork 3
/
login.php
38 lines (36 loc) · 959 Bytes
/
login.php
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
<?php include "header.php";
if(!isset($_SESSION)) {
session_start();
}
if (isset($_SESSION['SESS_NAME'])!="") {
header("Location: voter.php");
}
?>
<br>
<center>
<legend> <h3>Login for Voting </h3></legend>
<br>
</center>
<?php global $nam; echo $nam; ?>
<?php global $error; echo $error; ?>
<br>
<center><font size="4" >
<form action="login_action.php" method="post" id="myform" >
Username :
<input type="text" name="username" value="" >
<br>
<br>
Password :
<input type="password" name="password" value="" >
<br>
<br>
<input type="submit" name="login" value="login" >
</form></font>
</center>
<script type="text/javascript" >
var frmvalidator = new Validator("myform");
frmvalidator.addValidation("username" , "req" , "Please Enter Username");
frmvalidator.addValidation("username", "maxlen=50");
frmvalidator.addValidation("password", "req" , "Please Enter Password");
</script>
<?php include "footer.php"; ?>