-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvaccine.php
161 lines (138 loc) · 4.01 KB
/
vaccine.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
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
<!DOCTYPE html>
<html>
<head>
<title>Registration and Sign-up Form</title>
<link rel="stylesheet" type="text/css" href="style4.css">
<link href='https://fonts.googleapis.com/css?family=Bayon' rel='stylesheet'>
<script type="text/javascript">
function validateform()
{
var name=document.vac.username.value;
var address=document.vac.address.value;
var aadhar=document.vac.aadhar.value;
var Date = document.vac.date.value;
var phone = document.vac.phone.value;
var covishield=document.vac.vaccines[0].checked;
var covaxin=document.vac.vaccines[1].checked;
var dose1=document.vac.dose[0].checked;
var dose2=document.vac.dose[1].checked;
var male=document.vac.gender[0].checked;
var female=document.vac.gender[1].checked;
var other=document.vac.gender[2].checked;
var allergy = document.vac.allergy.value;
if (name==null || name==""){
alert("Error !!! No Name Found \n Name can't be empty/null");
return false;
}
if (address==null || address==""){
alert("Error !!! No Address Written.\n Address Field can't be empty/null");
return false;
}
if (aadhar==null || aadhar==""){
alert("Error !!! No Aadhar NO. written .\n Aadhar Field can't be empty/null");
return false;
}
if ( Date== null || Date== '')
{
alert('Date Should not be empty \n Please Enter Date ');
return false;
}
if (covishield==false && covaxin==false)
{
alert("Please choose your Vaccine [ covishield or covaxin ] ");
return false;
}
if (dose1==false && dose2==false)
{
alert("Please choose your Dose Number[ First or Second ] ");
return false;
}
if (male==false && female==false && other==false)
{
alert("Please choose your Gender! [ Male or Female or Other ] ");
return false;
}
}
</script>
</head>
<body>
<hr>
<div class="header">
<h2>Adult Vaccination</h2>
</div>
<form name="vac" form method="post" action="vacact.php" onsubmit="return validateform()">
<div class="input-group">
<label>Full Name </label>
<input type="text" name="username" >
</div>
<br>
<div class="input-group">
<label>Address </label>
<input type="text" name="address" >
</div>
<br>
<div class="input-group">
<label>Aadhar Card Number </label>
<input type="number" name="aadhar">
</div>
<br>
<p>Vaccination Date</p>
<input type="date" name="date" placeholder="dd-mm-yyyy" value="dd-mm-yyyy">
</div>
<br>
<br>
<div class="input-group">
<label for="Timeslot">Choose a Time Slot:</label>
<select name="timeslot" id="timing">
<option value="9-10 AM"> 9 - 10 AM</option>
<option value="10-11 AM"> 10 - 11 AM</option>
<option value="11-12 PM"> 11 - 12 PM</option>
<option value="12-1 PM"> 12 - 1 PM</option>
<option value="1-2 PM"> 1 - 2 PM</option>
<option value="2-3 PM"> 2 - 3 PM </option>
</select>
</div>
<br>
<br>
<div>
<label for="phone">Phone Number:</label><br><br>
<input type="tel" id="phone" name="phone" >
</div>
<br>
<p> Vaccine Name</p>
<input type="radio" id="vaccine_1" name="vaccines" value="Covishield">
<label for="Covishield">Covishield</label><br>
<input type="radio" id="vaccine_2" name="vaccines" value="Covaxin">
<label for="Covaxin">Covaxin</label><br>
<br>
<p> Dose</p>
<input type="radio" id="dose_1" name="dose" value="1">
<label for="1">First</label><br>
<input type="radio" id="dose_2" name="dose" value="2">
<label for="2">Second</label><br>
<br>
<p> Gender</p>
<input type="radio" id="male" name="gender" value="Male">
<label for="male">Male</label><br>
<input type="radio" id="female" name="gender" value="Female">
<label for="female">Female</label><br>
<input type="radio" id="others" name="gender" value="Others">
<label for="others">Others</label>
<br>
<br>
<div class="input-group">
<label>Any Allergies </label>
<input type="text" name="allergy" value="Enter Allergy if Present">
</div>
<br>
<center>
<div class="input-group">
<button type="submit" class="btn" name="reg_user">Book</button>
<button type="reset" class="btn" name="reset">Reset</button>
</div>
</center>
</form>
<hr>
</body>
</html>