-
Notifications
You must be signed in to change notification settings - Fork 0
/
updateallmedical.php
51 lines (36 loc) · 910 Bytes
/
updateallmedical.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
<?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=updatebyall.php>Update All Active Students</a> - Update All Students Medical Fee
<h2>Update All Students Medical Fee</h2>
<?php
if(isset($_POST["update"])){
$data = $_POST["data"];
$update = mysqli_query($con,"UPDATE students SET medical = '$data' WHERE students.active = 'Y'");
if($update){
echo "Data Updated";
}
else
{
echo "Data not updated<br>". mysqli_error();
}
}
else{
echo "<form action=updateallmedical.php method=post >";
echo "<table>
<tr><td>Enter Medical Fund</td><td><input type=text name=data ></td></tr>
<tr><td></td><td><input type=submit name=update value=update ></td></tr>
</table>";
echo "</form>";
}?>
</div>
</body>
</html>