diff --git a/adm/poll_form_update.php b/adm/poll_form_update.php index a3cba14ad..2d01fe6dd 100644 --- a/adm/poll_form_update.php +++ b/adm/poll_form_update.php @@ -10,6 +10,40 @@ auth_check($auth[$sub_menu], 'w'); check_admin_token(); +$check_keys = array( +'po_subject', +'po_poll1', +'po_poll2', +'po_poll3', +'po_poll4', +'po_poll5', +'po_poll6', +'po_poll7', +'po_poll8', +'po_poll9', +'po_cnt1', +'po_cnt2', +'po_cnt3', +'po_cnt4', +'po_cnt5', +'po_cnt6', +'po_cnt7', +'po_cnt8', +'po_cnt9', +'po_etc', +'po_level', +'po_point', +'po_id' +); + +foreach( $_POST as $key=>$value ){ + if( empty($value) ) continue; + + if( in_array($key, $check_keys) ) { + $_POST[$key] = strip_tags($value); + } +} + if ($w == '') { $sql = " insert {$g5['poll_table']}