-
Notifications
You must be signed in to change notification settings - Fork 0
/
registration.html
155 lines (124 loc) · 5.24 KB
/
registration.html
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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Sports Club Management | Welcome</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css">
<!-- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.100.2/css/materialize.min.css"> -->
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Roboto+Mono:400,500,700&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Open+Sans&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Muli:500&display=swap" rel="stylesheet">
<link rel="stylesheet" href="registration.css">
<script type="text/javascript" src="main.js"></script>
</head>
<body>
<div class="container-fluid header text-center">
Sports Club Management
</div>
<div class="container-fluid">
<div class="row justify-content-center">
<div class="col-0 btn-bar" onclick="navigation(event)">
<a href="#" class="myactive" id="registration">Registration</a>
<a href="#" class="" id="login">Login</a>
</div>
</div>
</div>
<div class="container-fluid">
<div class="row justify-content-center">
<div class="col-lg-6 box">
Registration
<div class="row justify-content-center">
<div class="col-lg-6">
<div class="inputbox">
<form action="registration_db.php" method="post">
Username<br>
<input type="text" name="uname" autocomplete="off" required>
E-Mail<br>
<input type="text" name="email" autocomplete="off" required>
Gender<br>
<input type="radio" name="gender" value="Male"> Male
<input type="radio" name="gender" value="Female"> Female
Password<br>
<input type="password" name="password" minlength="8" autocomplete="off" required>
Re-enter Password<br>
<input type="password" name="repassword" minlength="8" autocomplete="off" required>
<input type="submit" value="Submit" name="submit">
</form>
</div>
</div>
</div>
<a href="#" onclick="navigation(event)" id="loginLink">Already registered? Login</a>
</div>
</div>
</div>
<div class="container-fluid">
<div class="row justify-content-center">
<div class="col-lg-6 loginBox">
Login
<div class="row justify-content-center">
<div class="col-lg-6">
<div class="inputBox">
<form action="registration_db.php" method="post">
Username<br>
<input type="text" name="name" autocomplete="off" required>
Password<br>
<input type="password" name="password" minlength="8" autocomplete="off" required>
<input type="submit" value="Login" name="login">
</form>
</div>
</div>
</div>
<a href="#" onclick="navigation(event)" id="regLink">Not a registered user? Register</a>
</div>
</div>
</div>
<script src="https://code.jquery.com/jquery-3.4.1.slim.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/umd/popper.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js"></script>
<!-- <script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.100.2/js/materialize.min.js"></script> -->
</body>
</html>
<?php
if(isset($_GET['db_auth']) && $_GET['db_auth'] == 1){
$message = "Password & Re-entered Passsword must be same";
echo "<script type='text/javascript'>alert('$message');</script>";
}
if(isset($_GET['db_auth']) && $_GET['db_auth'] == 2){
$message = "Please enter valid e-mail address";
echo "<script type='text/javascript'>alert('$message');</script>";
}
if(isset($_GET['db_auth']) && $_GET['db_auth'] == 3){
$message = "The E-mail address is alredy exists";
echo "<script type='text/javascript'>alert('$message');</script>";
}
if(isset($_GET['db_auth']) && $_GET['db_auth'] == 4){
$message = "Username does not exists";
echo "<script type='text/javascript'>
var reg = document.getElementById('registration');
var login = document.getElementById('login');
var reg_box = document.getElementsByClassName('box')[0];
var login_box = document.getElementsByClassName('loginBox')[0];
reg.classList.remove('myactive');
login.classList.add('myactive');
reg_box.style.display='none';
login_box.style.display='block';
alert('$message');
</script>";
}
if(isset($_GET['db_auth']) && $_GET['db_auth'] == 5){
$message = "Password is invalid";
echo "<script type='text/javascript'>
var reg = document.getElementById('registration');
var login = document.getElementById('login');
var reg_box = document.getElementsByClassName('box')[0];
var login_box = document.getElementsByClassName('loginBox')[0];
reg.classList.remove('myactive');
login.classList.add('myactive');
reg_box.style.display='none';
login_box.style.display='block';
alert('$message');
</script>";
}
?>