Skip to content

Commit 60f71a4

Browse files
committed
update data
1 parent 9129067 commit 60f71a4

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

backend/process_update.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?php
2+
require "Configfile.php";
3+
$id = $_POST['id'];
4+
$username = $_POST['username'];
5+
$firstname = $_POST['firstname'];
6+
7+
$sql = "UPDATE users1 SET username='$username', firstname='$firstname' WHERE id='$id'";
8+
if ($link->query($sql) === TRUE) {
9+
echo "Record updated successfully";
10+
} else {
11+
echo "Error updating record: " . $link->error;
12+
}
13+
14+
$link->close();
15+
?>

0 commit comments

Comments
 (0)