From 6d648ea6681f843afbd18e026cd923a33d0ff8d7 Mon Sep 17 00:00:00 2001 From: rpsigh-061194 <73515923+rpsigh-061194@users.noreply.github.com> Date: Tue, 27 Oct 2020 23:02:07 +0530 Subject: [PATCH] update.php --- update.php | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 update.php diff --git a/update.php b/update.php new file mode 100644 index 0000000..1cacc22 --- /dev/null +++ b/update.php @@ -0,0 +1,27 @@ +connect_error) +{ + die("Connection failed: " . $conn->connect_error); +} + +$sql = "UPDATE MyGuests SET lastname='Doe' WHERE id="; + +if ($conn->query($sql) === TRUE) +{ + echo "Record updated successfully"; +} +else +{ + echo "Error updating record: " . $conn->error; +} + +$conn->close(); +?>