-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbook.php
More file actions
182 lines (168 loc) · 7.45 KB
/
book.php
File metadata and controls
182 lines (168 loc) · 7.45 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>BED BOOKING</title>
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" href="css/theme.css" type="text/css" />
<link rel="stylesheet" href="css/media.css" type="text/css" />
<link rel="stylesheet" href="css/font-awesome.min.css" type="text/css" />
<link href='https://fonts.googleapis.com/css?family=Open+Sans:400,300,600,600italic,400italic,800,700' rel='stylesheet' type='text/css'>
<link href='https://fonts.googleapis.com/css?family=Oswald:400,700,300' rel='stylesheet' type='text/css'>
<script>
var rangeLabel = document.getElementById("range-label");
var experience = document.getElementById("experience");
function change() {
rangeLabel.innerText = experience.value + "";
}
</script>
</head>
<body>
<form class="signup-form" action="" method="post">
<!-- form header -->
<div class="form-header">
<h1><font style="color:red;">EMERGENCY</font> BED BOOKING</h1>
</div>
<!-- form body -->
<div class="form-body">
<!-- Firstname and Lastname -->
<div class="horizontal-group">
<div class="form-group left">
<label for="firstname" class="label-title">First name *</label>
<input type="text" name="firstname" class="form-input" placeholder="Enter your first name" required="required" />
</div>
<div class="form-group right">
<label for="lastname" class="label-title">Last name</label>
<input type="text" name="lastname" class="form-input" placeholder="Enter your last name" />
</div>
</div>
<!-- Passwrod and confirm password -->
<div class="horizontal-group">
<div class="form-group left">
<label for="phoneno" class="label-title">Phone Number*</label>
<input type="number" name="phoneno" class="form-input" placeholder="Enter your phone number" required="required">
</div>
<div class="form-group right">
<label for="aadhar" class="label-title">Aadhar number of the Patient*</label>
<input type="text" class="form-input" name="aadhar" placeholder="Enter your aadhar number" required="required">
</div>
</div>
<!-- Email -->
<div class="form-group">
<label for="address" class="label-title">Address*</label>
<input type="text" name="address" class="form-input" placeholder="Enter your address" required="required">
</div>
<!-- Gender and Hobbies -->
<div class="horizontal-group">
<div class="form-group left">
<label class="label-title">Gender*</label>
<div class="input-group">
<label for="male"><input type="radio" name="gender" value="male" id="male"> Male</label>
<label for="female"><input type="radio" name="gender" value="female" id="female"> Female</label>
</div>
</div>
<div class="form-group right">
<label class="label-title">Done a confirm test of COVID?*</label>
<div class="input-group">
<label for="yes"><input type="radio" name="covid" value="yes" id="yes"> Yes</label>
<label for="no"><input type="radio" name="covid" value="no" id="no"> No</label>
</div>
</div>
</div>
<!-- Source of Income and Income -->
<div class="horizontal-group">
<div class="form-group left" >
<label class="label-title">Tell the field of your illness*</label>
<select class="form-input" name="ill" required="required">
<option value="Physical Injury">Physical Injury</option>
<option value="Internal Injury">Internal Injury</option>
<option value="Harmful diseases">Harmful diseases</option>
<option value="Covid Positive">Covid (+)ve</option>
</select>
</div>
<div class="form-group right">
<label for="experience" class="label-title">How are you feeling on a degree of 10?(Only for Covid Patients)*</label>
<input type="range" min="0" max="10" step="1" value="0" name="degree" class="form-input" onChange="change();" style="height:28px;width:78%;padding:0;" required="required">
<span id="range-label">0</span>
</div>
</div>
<!-- Profile picture and Age -->
<div class="horizontal-group">
<div class="form-group left" >
<label class="label-title">Please tell your bed preference*</label>
<select class="form-input" name="bed" required="required">
<option value="pward">Private ward</option>
<option value="gward">General ward</option>
</select>
</div>
<div class="form-group right">
<label for="experience" class="label-title">Age*</label>
<input type="number" min="1" max="80" value="1" name="age" class="form-input" required="required">
</div>
</div>
<!-- Bio -->
<div class="form-group">
<label for="choose-file" class="label-title">Describe your Illness here*</label>
<textarea class="form-input" rows="4" cols="50" name="illness" style="height:auto" required="required"></textarea>
</div>
</div>
<!-- form-footer -->
<div class="form-footer">
<span>* required</span>
<button type="submit" class="btn" name="submit">Send request</button>
</div>
</form>
<!-- Script for range input label -->
<footer>
<div class="Cntr">
<p>COPYRIGHT © COVIDHEALTHCARE GOVERNMENT OF INDIA<a rel="nofollow" href="http://www.templatemo.com" target="_parent"></a></p>
</div>
</footer>
</body>
</html>
<?php
include 'dbcon.php';
if(isset($_POST['submit']))
{
$firstname = $_POST['firstname'] ;
$lastname = $_POST['lastname'] ;
$phoneno = $_POST['phoneno'] ;
$aadhar =$_POST['aadhar'] ;
$address =$_POST['address'] ;
$gender = $_POST['gender'] ;
$covid = $_POST['covid'] ;
$ill = $_POST['ill'] ;
$degree = $_POST['degree'];
$bed =$_POST['bed'] ;
$age = $_POST['age'] ;
$illness = $_POST['illness'] ;
$aadharquery = "select * from book1 where aadhar='$aadhar' ";
$query = mysqli_query($con,$aadharquery);
$aadharcount = mysqli_num_rows($query);
if($aadharcount>0)
{
echo "aadhar already exists";
}
else
{
$insertquery = "insert into book1(firstname, lastname, phoneno, aadhar, address, gender, covid, covid2, degree, bed, age, illness) values('$firstname','$lastname', $phoneno,'$aadhar','$address', '$gender','$covid' ,'$ill' ,'$degree','$bed','$age','$illness') ";
$iquery = mysqli_query($con, $insertquery);
if($iquery)
{
?>
<script>
alert("Request sent successfully");
</script>
<?php
}
else
{
?>
<script>
alert(" Request not sent successfully");
</script>
<?php
}
}
}
?>