<?php
ob_start();
include 'include/db.php';
include 'include/connect.php';

$id = $_POST['id'];
$r = $db->findByPK('tbtrip','trip_id',$id)->executeRow();
if($db->delete('tbtrip','trip_id',$id)){
	//ใช้ลบรูป
	//$check = unlink('database/uploadguns/'.$r['picture']);
	echo "0";
	} else {
                echo "1";
        }


?>