See here for info on updating values:
http://www.w3schools.com/php/php_mysql_update.aspAlso, this code is very unsecure and is liable to SQL injection:
$targetID=$_POST['id'];
$date=date("Y/n/d");
$id=$_POST['id'];
$category=$_POST['category'];
$subcategory=$_POST['subcategory'];
$date=$_POST['date'];
To solve this, do a strip_tags on all these variables.