Skip to content

Instantly share code, notes, and snippets.

@itswadesh
Last active March 27, 2017 17:23
Show Gist options
  • Save itswadesh/a2483604274c05b253a37782a5254499 to your computer and use it in GitHub Desktop.
Save itswadesh/a2483604274c05b253a37782a5254499 to your computer and use it in GitHub Desktop.
<?php
require_once '../includes/db.php'; // The mysql database connection script
if(isset($_GET['taskID'])){
$status = $_GET['status'];
$taskID = $_GET['taskID'];
$query="update tasks set status='$status' where id='$taskID'";
$result = $mysqli->query($query) or die($mysqli->error.__LINE__);
$result = $mysqli->affected_rows;
$json_response = json_encode($result);
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment