<?php
/**
 * Created by PhpStorm.
 * User: jaskokoyn
 * Date: 4/26/2015
 * Time: 2:05 PM
 */

require('../../inc/db.php');
include('../../inc/functions.php');

$params                 =   getParams();

if( !isReady($params, 'id') ){
    die();
}

$filesQuery             =   $db->prepare("DELETE FROM polls WHERE id = :id AND uid = :uid");
$filesQuery->execute(array(
    ":id"               =>  intval($params['id']),
    ":uid"              =>  $_SESSION['uid']
));

die();