diff --git a/editpost.php b/editpost.php index 44f5eb6..8bdebef 100644 --- a/editpost.php +++ b/editpost.php @@ -5,6 +5,25 @@ #get id $id = mysqli_real_escape_string($conn,$_GET['id']); #create query + $query = 'SELECT * FROM post WHERE id='.$id; #get result $result = mysqli_query($conn,$query); @@ -28,6 +47,25 @@ title='$title', author='$author', body='$body' + WHERE id= {$update_id}"; if(mysqli_query($conn,$query)){ @@ -88,4 +126,4 @@ - \ No newline at end of file +