<?

include '../../config.php';
include '../../func.php';
head();

$id = num($_GET['room']);
$room = mysql_fetch_assoc(mysql_query("SELECT * FROM `room` WHERE `id` = '".$id."'"));

if ( isset( $room['room'] ) ) {
    
    $result = mysql_query("DELETE FROM `room` WHERE `id` = '".$id."'");
    
    if ( $result != NULL ) {
        
        header('Location: rooms.php');
        
    } else {
        
        echo link2 . 'Ошибка при удалении' . div;
        
    }
    
}