-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathuserregistration.php
More file actions
186 lines (153 loc) · 9.1 KB
/
userregistration.php
File metadata and controls
186 lines (153 loc) · 9.1 KB
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
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
<?php
session_start();
if (isset($_SESSION['auth_user'])) {
header("location:index.php");
}
include('includes/header.php');
include("admin/config/dbcon.php");
$qry = "select * from states";
$result = $con->query($qry);
?>
<section class="intro">
<div class="mask d-flex align-items-center h-100 gradient-custom">
<div class="container">
<div class="row justify-content-center">
<div class="col-11 col-lg-8 col-xl-7">
<div class="card">
<div class="card-body p-3 p-md-4">
<h2 class="mb-3 pb-2">Registration Form</h2>
<?php include("poojari/message.php"); ?>
<form action="userregistrtioncode.php" class="needs-validation" method="post" novalidate>
<div class="row">
<div class="col-md-6 mb-2">
<div class="form-outline">
<input type="text" id="firstName" class="form-control" name="txtfname" required />
<label class="form-label" for="firstName">First Name</label>
</div>
</div>
<div class="col-md-6 mb-2">
<div class="form-outline">
<input type="text" id="lastName" class="form-control" name="txtlname" required />
<label class="form-label" for="lastName">Last Name</label>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6 mb-2">
<div class="form-outline datepicker">
<input type="date" class="form-control" id="birthdayDate" name="txtdate" required />
<label for="birthdayDate" class="form-label">Birthday</label>
</div>
</div>
<div class="col-md-6 mb-2">
<h6 class="mb-2 pb-1">Gender: </h6>
<div class="form-check ">
<input class="form-check-input" type="radio" name="txtgen" id="femaleGender"
value="Female" />
<label class="form-check-label" for="femaleGender">Female</label>
</div>
<div class="form-check ">
<input class="form-check-input" type="radio" name="txtgen" id="maleGender"
value="Male" />
<label class="form-check-label" for="maleGender">Male</label>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12 mb-2">
<div class="form-outline">
<input type="email" id="emailAddress" name="txtemail" required
class="form-control" />
<label class="form-label" for="emailAddress">Email</label>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6 mb-2">
<div class="form-outline">
<input type="password" id="password" name="txtpass" class="form-control" required />
<label class="form-label" for="password">Passwrod</label>
</div>
</div>
<div class="col-md-6 mb-2">
<div class="form-outline">
<input type="password" id="conpassword" name="txtconpass" required
class="form-control" />
<label class="form-label" for="conpassword">confirm password</label>
</div>
</div>
</div>
<div class="form-outline mb-2">
<textarea class="form-control" id="address" name="txtaddress" rows="4" required></textarea>
<label class="form-label" for="address">Address</label>
</div>
<div class="row">
<div class="col-md-6 mb-2">
<select class="form-select" aria-label="Default select example" id="states" required
name="txtstate">
<option selected>----States----</option>
<?php
while ($row = $result->fetch_assoc()):
?>
<option value="<?= $row['id']; ?>"><?= $row['name']; ?></option>
<?php endwhile; ?>
</select>
</div>
<div class="col-md-6 mb-2">
<select class="form-select" aria-label="Default select example" id="city"
name="txtcity">
<option >----City----</option>
</select>
</div>
</div>
<div class="row">
<div class="col-md-12 mb-2">
<div class="input-group mb-3 form-outline mb-4">
<span class="input-group-text" id="basic-addon1">+91</span>
<input type="tel" id="phonenumber" name="txtphone" class="form-control" required />
<label class="form-label" for="phonenumber">Phone Number</label>
</div>
<div class="invalid-feedback">
This Email field can't be Empty!!!!! </div>
<div class="valid-feedback">
Looks good!
</div>
</div>
</div>
<div class="row">
<div class="col-12">
<div class="mt-2">
<input class=" btn btn-lg " type="submit" name="submit" value="Submit" />
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<script>
// Example starter JavaScript for disabling form submissions if there are invalid fields
(function () {
'use strict'
// Fetch all the forms we want to apply custom Bootstrap validation styles to
var forms = document.querySelectorAll('.needs-validation')
// Loop over them and prevent submission
Array.prototype.slice.call(forms)
.forEach(function (form) {
form.addEventListener('submit', function (event) {
if (!form.checkValidity()) {
event.preventDefault()
event.stopPropagation()
}
form.classList.add('was-validated')
}, false)
})
})()
</script>
<?php
include('includes/scripts.php');
?>