-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathsignup.php
97 lines (97 loc) · 3.2 KB
/
signup.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
<?php
session_start();
?>
<?php require_once("includes/functions.php") ?>
<?php require_once("includes/connection.php") ?>
<?php require_once("backend/signupbackend.php") ?>
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/login.css" rel="stylesheet">
<link href="css/bootstrap-social.css" rel="stylesheet">
<link href="font-awesome/css/font-awesome.min.css" rel="stylesheet">
<div class="container">
<div id="signupbox" style="margin-top:25px;" class="mainbox col-md-6 col-md-offset-3 col-sm-8 col-sm-offset-2">
<div class="panel panel-info" >
<div class="panel-heading">
<div class="panel-title">Sign Up</div>
</div>
<div style="padding-top:30px" class="panel-body" >
<form role="form" class="form-horizontal" action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]);?>" method="post" onsubmit="return checkForm(this);">
<div id="signupalert" style="display:none" class="alert alert-danger">
<p>Error:</p>
<span></span>
</div>
<div class="form-group">
<label for="firstname" class="col-md-3 control-label">First Name</label>
<div class="col-md-9">
<input type="text" class="form-control" name="firstname" placeholder="First Name" required>
</div>
</div>
<div class="form-group">
<label for="lasttname" class="col-md-3 control-label">Last Name</label>
<div class="col-md-9">
<input type="text" class="form-control" name="lastname" placeholder="Last Name" required>
</div>
</div>
<div class="form-group">
<label for="username" class="col-md-3 control-label">Username</label>
<div class="col-md-9">
<input type="text" class="form-control" name="username" placeholder="Desired Username" required>
</div>
</div>
<div class="form-group">
<label for="password" class="col-md-3 control-label">Password</label>
<div class="col-md-9">
<input type="password" id="pass" class="form-control" name="password" placeholder="Password" required>
</div>
</div>
<div class="form-group">
<label for="password" class="col-md-3 control-label">Retype Password</label>
<div class="col-md-9">
<input type="password" id="cpass" class="form-control" name="repassword" placeholder="Please enter your password again" required>
</div>
</div>
<div class="form-group">
<label for="email" class="col-md-3 control-label">E-mail</label>
<div class="col-md-9">
<input type="text" class="form-control" name="email" placeholder="E-mail Address" required>
</div>
</div>
<div class="form-group-last">
<div class="col-sm-offset-8 col-sm-9">
<a href="login.php" class="btn btn-link btn"><strong class="">Cancel</strong></a>
<button type="submit" class="btn btn-primary" name="submit">Sign Up</button>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
<!-- Script to check password !-->
<script type="text/javascript">
function checkForm(form)
{
if(form.password.value.length < 8)
{
alert("Error: Password must be at least 8 characters long");
form.password.focus(); return false;
}
if(form.password.value != form.repassword.value)
{
alert("Error: Passwords do not match");
form.password.focus(); return false;
}
}
</script>
<script>
function checkForm1(form)
{
if(form.password.value != form.repassword.value)
{
alert("Error: Passwords do not match");
form.password.focus(); return false;
}
}
</script>