<?php
if ( !defined( 'SMARTY_DIR' ) ) {
	include_once( '../init.php' );
}

include ( 'sessioninc.php' );

define( 'PAGE_ID', 'poll_mgt' );

if ( !checkAdminPermission( PAGE_ID ) ) {

	header( 'location: not_authorize.php' );
	exit;
}


$osDB->query( 'INSERT INTO ! (  pollid, opt, enabled ) VALUES ( ?, ?, ?  )', array( POLLOPTS_TABLE,  $_POST['txtpollid'], $_POST['txtpolloption'], $_POST['txtenabled'] ) );

header( 'location: polloptions.php?pollid=' . $_POST['txtpollid'] );

exit;
?>