<?php
require_once('../../../../wp-config.php');


global $wpdb;

$citytablename = $wpdb->prefix.'findus_city'; 
$loctablename = $wpdb->prefix.'findus_location';

if (isset($_GET['cid'])) {



        $delete_command = "DELETE FROM " . $citytablename ." where id=".$_GET['cid'] ;
        $result = $wpdb->query($delete_command);


        echo "<div id='message' class='updated'><p><strong>City deleted successfully</strong></p></div>";

}else if (isset($_GET['lid'])) {



        $delete_command = "DELETE FROM " . $loctablename ." where id=".$_GET['lid'] ;
        $result = $wpdb->query($delete_command);


        echo "<div id='message' class='updated'><p><strong>Location deleted successfully</strong></p></div>";

}