-
Notifications
You must be signed in to change notification settings - Fork 0
/
updateclassmedical.php
71 lines (54 loc) · 1.41 KB
/
updateclassmedical.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
<?php
// Start the session
session_start();
?>
<html>
<head>
<?php require "header.php"; ?>
</head>
<body>
<div class=wraper>
<?php require "nav_bar.php"; ?>
<a href=index.php>Home</a> - <a href=bulkupdatestd.php>Update Bulk Students</a> - <a href=updatebyclass.php>Update by Class</a> - Update Class Medical Fee
<h2>Update Class Medical Fee</h2>
<?php
if(isset($_POST["update"])){
$data = $_POST["data"];
$class = $_POST["class"];
$update = mysqli_query($con,"UPDATE students SET medical = '$data' WHERE students.class = '$class'");
if($update){
echo "Data Updated";
}
else
{
echo "Data not updated<br>". mysqli_error();
}
}
else{
echo "<form action=updateclassmedical.php method=post >";
echo "<table>
<tr><td>Enter Medical Fund</td><td><input type=text name=data ></td></tr>
<tr><td>Enter Class</td><td>
<select name=class >
<option value=PG>Play Group</option>
<option value=Nursery>Nursery</option>
<option value=Prep>Prep</option>
<option value=1st>1st</option>
<option value=2nd>2nd</option>
<option value=3rd>3rd</option>
<option value=4th>4th</option>
<option value=5th>5th</option>
<option value=6th>6th</option>
<option value=7th>7th</option>
<option value=8th>8th</option>
<option value=9th>9th</option>
<option value=10th>10th</option>
</select>
</td></tr>
<tr><td></td><td><input type=submit name=update value=update ></td></tr>
</table>";
echo "</form>";
}?>
</div>
</body>
</html>