-
Notifications
You must be signed in to change notification settings - Fork 0
/
updatefamilygenerator.php
53 lines (38 loc) · 998 Bytes
/
updatefamilygenerator.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
<?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=updatebyfamily.php>Update by Family</a> - Update Family Generator Fee
<h2>Update Family Generator Fee</h2>
<?php
if(isset($_POST["update"])){
$data = $_POST["data"];
$fn = $_POST["fn"];
$update = mysqli_query($con,"UPDATE students SET sports = '$data' WHERE students.faimlynum = '$fn'");
if($update){
echo "Data Updated";
}
else
{
echo "Data not updated<br>". mysqli_error();
}
}
else{
echo "<form action=updatefamilygenerator.php method=post >";
echo "<table>
<tr><td>Enter Generator Fee</td><td><input type=text name=data ></td></tr>
<tr><td>Enter Family Number</td><td><input type=text name=fn ></td></tr>
<tr><td></td><td><input type=submit name=update value=update ></td></tr>
</table>";
echo "</form>";
}?>
</div>
</body>
</html>