<?php
////////////////////////////////////////////////////////////////////////
// Breeze Website Builder
// Copyright Silver Dolphin Solutions, LLC, Edward Lemmers, P.E.
// For licensing, see license.txt.
// Completely revised: 12/17/2010	ELL
// Revised: 2/8/2012	ELL
// Added table prefix handling.
// 

	include ("check_session.php");
	
	$ID = $_POST['IDRemove'];
	$menu = $_POST['menu'];
	
	$suffix = substr($menu, 4);
	$menu_items_table = "menu"  . $suffix . "_items";
		
	$query = "DELETE FROM `" . BWB_TABLE_PREFIX . $menu_items_table . "` WHERE `ID` = '$ID'";
	$cnt = $bwb_dbh->exec($query);
	
	header("Location: populate_menu_items.php?menu=$menu");
	
?>
