-
Notifications
You must be signed in to change notification settings - Fork 3
/
register.php
53 lines (52 loc) · 1.61 KB
/
register.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<script src='https://www.google.com/recaptcha/api.js'></script>
<?php include "header.php";
if(!isset($_SESSION)) {
session_start();
}
if (isset($_SESSION['SESS_NAME'])!="") {
header("Location: voter.php");
}
?>
<br>
<br>
<center>
<legend> <h3> Register </h3></legend> </center>
<?php global $nam; echo $nam; ?>
<?php global $error; echo $error; ?>
<center><font size="4" >
<form action= "reg_action.php" method= "post" id="myform" >
Firstname:
<input type="text" name="firstname" value="" />
<br>
<br>
Lastname:
<input type="text" name="lastname" value="" />
<br>
<br>
Username:
<input type="text" name="username" value="" />
<br>
<br>
Password:
<input type="password" name="password" value="" />
<br>
<br>
<div class="g-recaptcha" data-sitekey="6LeD3hEUAAAAAKne6ua3iVmspK3AdilgB6dcjST0"></div>
<br>
<br>
<input type="submit" name="submit" value="Next" />
</form>
</font>
</center>
<script type= "text/javascript" >
var frmvalidator = new Validator("myform");
frmvalidator.addValidation("firstname","req","Please enter student firstname");
frmvalidator.addValidation("firstname","maxlen=50");
frmvalidator.addValidation("lastname","req","Please enter student lastname");
frmvalidator.addValidation("lastname","maxlen=50");
frmvalidator.addValidation("username","req","Please enter student username");
frmvalidator.addValidation("username","maxlen=50");
frmvalidator.addValidation("password","req","Please enter student password");
frmvalidator.addValidation("password","minlen=6","Password must not be less than 6 characters.");
</script>
<?php include "footer.php" ;?>