-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathupdate.php
More file actions
36 lines (28 loc) · 951 Bytes
/
update.php
File metadata and controls
36 lines (28 loc) · 951 Bytes
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
<?php
require('connectdb.php');
$id = $_POST["id"];
$Firstname = $_POST["Firstname"];
$Lastname = $_POST["Lastname"];
$Birthday = $_POST["Birthday"];
$Gender = $_POST["Gender"];
$Age = $_POST["Age"];
$Career = $_POST["Career"];
$Village = $_POST["Village"];
$District = $_POST["District"];
$Province = $_POST["Province"];
$Phone = $_POST["Phone"];
$Email = $_POST["Email"];
$Password = $_POST["Password"];
$Subject = $_POST["Subject"];
$sql = "UPDATE students SET Firstname='$Firstname',Lastname='$Lastname',Birthday='$Birthday',
Gender='$Gender',Age='$Age',Career='$Career',Village='$Village',District='$District',Province='$Province',Phone='$Phone',Email='$Email',Password='$Password',Subject='$Subject'
WHERE id=$id ";
echo $sql;
$result = mysqli_query($Connect,$sql);
if($result){
header("location:showdata.php");
exit(0);
}else{
echo "ເກີດຂໍ້ຜິດພາດເກີດຂື້ນ".mysqli_error($Connect);
}
?>