updating a row from databse using php

Solutions on MaxInterview for updating a row from databse using php by the best coders in the world

showing results for - "updating a row from databse using php"
Matilda
04 Mar 2017
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}