Question : updating a row from databse using php
Answered by : modern-mantis-jqh33s1vt2fs
// ...
if (isset($_POST['update'])) { $id = $_POST['id']; $name = $_POST['name']; $address = $_POST['address']; mysqli_query($db, "UPDATE info SET name='$name', address='$address' WHERE id=$id"); $_SESSION['message'] = "Address updated!"; header('location: index.php');
}
Source : https://codewithawa.com/posts/php-crud-create,-edit,-update-and-delete-posts-with-mysql-database | Last Update : Sun, 31 Jan 21