<?php
$filename = 'c_leitura.php';

if (!file_exists($filename)) {
  header("Location: error.php"); exit;   
}				
include 'c_leitura.php';
require_once("db.php");

$id = $_POST['id'];

$query = "DELETE FROM crashlog WHERE id='$id'";
$result = mysql_query($query) or die(mysql_error());

if ($result)
	echo json_encode(array('success'=>1, 'msg'=>'Registro deletado com sucesso!'));
else
	echo json_encode(array('success'=>0, 'msg'=>'Erro ao deletar Registro'));
exit;
?>
