-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinsert.php
267 lines (260 loc) · 9.67 KB
/
insert.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
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
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
<?php
require_once('config.php');
if( $_SERVER['REQUEST_METHOD']=='POST' && isset($_POST['submit'] ) )
{
$id = $_POST["id"];
$fname = $_POST["fname"];
$lname = $_POST["lname"];
$email = $_POST["email"];
$designation= $_POST["designation"];
$department = $_POST["department"];
$peraddress = $_POST["peraddress"];
$preaddress = $_POST["preaddress"];
$birthday = $_POST["birthday"];
$joining = $_POST["joining"];
$basic = $_POST["basic"];
$hrent = $_POST["hrent"];
$mallowance = $_POST["mallowance"];
$dallowance = $_POST["dallowance"];
$callowance = $_POST["callowance"];
$tallowance = $_POST["tallowance"];
$wallowance = $_POST["wallowance"];
$profund = $_POST["profund"];
$arecovery = $_POST["arecovery"];
$clubsubs = $_POST["clubsubs"];
$catering = $_POST["catering"];
$loanded = $_POST["loanded"];
$mcharge = $_POST["mcharge"];
$bus = $_POST["bus"];
$sql="INSERT INTO
pay_roll( id ,
fname ,
lname ,
email,
designation ,
department ,
peraddress ,
preaddress ,
birthday ,
joining ,
basic ,
hrent ,
mallowance ,
dallowance ,
callowance ,
tallowance ,
wallowance ,
profund ,
arecovery ,
clubsubs ,
catering ,
loanded ,
mcharge ,
bus)
VALUES ('$id',
'$fname',
'$lname',
'$email',
'$designation',
'$department',
'$peraddress',
'$preaddress',
'$birthday',
'$joining' ,
'$basic',
'$hrent',
'$mallowance',
'$dallowance',
'$callowance',
'$tallowance',
'$wallowance',
'$profund',
'$arecovery',
'$clubsubs',
'$catering',
'$loanded',
'$mcharge',
'$bus' )";
mysql_query($sql);
header('location:insert.php');
}
?>
<?php include('header_admin.php') ?>
<div class="container">
<div class="row">
<div class="col-md-6 col-md-offset-3">
<h1 class="text-center">Entry form: control states</h1>
<hr>
<form action="<?php echo $_SERVER['PHP_SELF']?>" method="post" class="form-horizontal" role="form">
<h2 class="text-center">Personal Info</h2>
<div class="form-group">
<label class="col-sm-2 control-label">ID</label>
<div class="col-sm-10">
<input class="form-control" name="id" type="number" placeholder="Enter id">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">First Name</label>
<div class="col-sm-10">
<input class="form-control" name="fname" type="text" placeholder="Enter First Name">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">Last Name</label>
<div class="col-sm-10">
<input class="form-control" name="lname" type="text" placeholder="Enter Last Name">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">E-Mail</label>
<div class="col-sm-10">
<input class="form-control" name="email" type="text" placeholder="Enter Email">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">Designation</label>
<div class="col-sm-10">
<select class="form-control" name="designation">
<option value="-1">Please Select</option>
<option>Ass. Prof</option>
<option>Teacher</option>
<option>Officer</option>
<option>Engineer</option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">Department</label>
<div class="col-sm-10">
<select class="form-control" name="department" >
<option value="-1">Please Select</option>
<option>CSE</option>
<option>English</option>
<option>Music</option>
<option>Physics</option>
<option>Biology</option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">Permanent Address</label>
<div class="col-sm-10">
<textarea class="form-control" name="peraddress" type="text" placeholder="Permanent Address"></textarea>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">Present Address</label>
<div class="col-sm-10">
<textarea class="form-control" name="preaddress" type="text area" placeholder="Present Address"></textarea>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">Date of Birth</label>
<div class="col-sm-10">
<input class="form-control" name="birthday" type="date" placeholder="Date of Birth">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">First Joining</label>
<div class="col-sm-10">
<input class="form-control" name="joining" type="date" placeholder="First Joining">
</div>
</div>
<h2 class="text-center">Earning Header</h2>
<div class="form-group">
<label class="col-sm-2 control-label">Basic</label>
<div class="col-sm-10">
<input class="form-control" name="basic" type="number" placeholder="Basic">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">House Rent</label>
<div class="col-sm-10">
<input class="form-control" name="hrent" type="number" placeholder="House Rent">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">Medical Allowance</label>
<div class="col-sm-10">
<input class="form-control" name="mallowance" type="number" placeholder="Medical Allowance">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">Dearness Allowance</label>
<div class="col-sm-10">
<input class="form-control" name="dallowance" type="number" placeholder="Dearness Allowance">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">Conveyance Allowance</label>
<div class="col-sm-10">
<input class="form-control" name="callowance" type="number" placeholder="Conveyance Allowance">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">Tiffin Allowance</label>
<div class="col-sm-10">
<input class="form-control" name="tallowance" type="number" placeholder="Tiffin Allowance">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">Wash Allowance</label>
<div class="col-sm-10">
<input class="form-control" name="wallowance" type="number" placeholder="Wash Allowance">
</div>
</div>
<h2 class="text-center">Deduction Header</h2>
<div class="form-group">
<label class="col-sm-2 control-label">Provnameend fund</label>
<div class="col-sm-10">
<input class="form-control" name="profund" type="number" placeholder="Provnameend fund">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">Advance Recovery</label>
<div class="col-sm-10">
<input class="form-control" name="arecovery" type="number" placeholder="Advance Recovery">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">Club Subscription</label>
<div class="col-sm-10">
<input class="form-control" name="clubsubs" type="number" placeholder="Club Subscription">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">Catering</label>
<div class="col-sm-10">
<input class="form-control" name="catering" type="number" placeholder="Catering">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">Loan deduction</label>
<div class="col-sm-10">
<input class="form-control" name="loanded" type="number" placeholder="Loan deduction">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">Medicine Charge</label>
<div class="col-sm-10">
<input class="form-control" name="mcharge" type="number" placeholder="Medicine Charge">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">Bus</label>
<div class="col-sm-10">
<input class="form-control" name="bus" type="number" placeholder="Bus">
</div>
</div>
<button type="submit" name="submit" class="btn btn-primary btn-block">Submit</button>
</form>
</div>
</div>
</div>
<?php include('footer.php') ?>
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<!-- Include all compiled plugins (below), or include indivnameual files as needed -->
<script src="js/bootstrap.min.js"></script>
</body>
</html>