MySQL & PHP | Update doesnt work , delete working perfect : <?php

> Blockquote
> 
> Blockquote

$connect=mysqli_connect('localhost','root','samagulf','wordpress');

$input=filter_input_array(INPUT_POST);

$country=mysqli_real_escape_string($connect,$input["country"]);

$city=mysqli_real_escape_string($connect,$input["city"]);

$for=mysqli_real_escape_string($connect,$input["for"]);

$title=mysqli_real_escape_string($connect,$input["title"]);

$details=mysqli_real_escape_string($connect,$input["details"]);

$price=mysqli_real_escape_string($connect,$input["price"]);

$email=mysqli_real_escape_string($connect,$input["email"]);

$phone=mysqli_real_escape_string($connect,$input["phone"]);

$photo=mysqli_real_escape_string($connect,$input["photo"]);

if($input["action"]==='edit')
{

> Blockquote

$query="UPDATE wp_wpdatatable_1

> Blockquote

SET country=' ".$country." ',city=' ".$city." ',for=' ".$for." ',title=' 

       ".$title." ',details=' ".$details." ',price=' ".$price." ',email=' 
       ".$email." 

      ',phone=' ".$phone." ',photo=' ".$photo." '

> Blockquote

where wdt_ID=' ".$input["wdt_ID"]." ' ";

> Blockquote

mysqli_query($connect,$query);
}

> Blockquote

if($input["action"]==='delete')
{

> Blockquote

$query="DELETE FROM wp_wpdatatable_1

> Blockquote

where wdt_ID=' ".$input["wdt_ID"]." ' ";

> Blockquote

mysqli_query($connect,$query);
}

> Blockquote

echo json_encode($input);

> Blockquote

?>
