Skip to content

Instantly share code, notes, and snippets.

@itswadesh
Last active March 27, 2017 17:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save itswadesh/6fd9c5bf457827fd540acdd3086c758a to your computer and use it in GitHub Desktop.
Save itswadesh/6fd9c5bf457827fd540acdd3086c758a to your computer and use it in GitHub Desktop.
<?php
require_once '../includes/db.php'; // The mysql database connection script
if(isset($_GET['taskID'])){
$taskID = $_GET['taskID'];
$query="delete from tasks where id='$taskID'";
$result = $mysqli->query($query) or die($mysqli->error.__LINE__);
$result = $mysqli->affected_rows;
echo $json_response = json_encode($result);
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment