1// ...
2
3if (isset($_POST['update'])) {
4 $id = $_POST['id'];
5 $name = $_POST['name'];
6 $address = $_POST['address'];
7
8 mysqli_query($db, "UPDATE info SET name='$name', address='$address' WHERE id=$id");
9 $_SESSION['message'] = "Address updated!";
10 header('location: index.php');
11}