<?php
/**
 * logout.php - Processes Admin Logout
 * 
 *  */
include '../inc/config.inc.php';
session_start();

$admin_id = $_SESSION['admin'];

$stmt = $db_con->prepare("SELECT * FROM admin WHERE id=:admin_id");
$stmt->execute(array(":admin_id"=>$admin_id));

if ( $stmt->rowCount() > 0 ){

    session_destroy();
    //header('Location: ' . $BASE_URL . 'wp-admin/');
    header('Location: ' . $BASE_URL . 'signin');
}
?>
