<?php function opt_ajax_setting() { $allowed_settings = array( 'logging', 'repetition_type', 'repetition_value', 'tooltips_enabled' ); $settings = explode('|||', $_REQUEST['d']); if (in_array($settings[0], $allowed_settings)) { opt_settings($settings[0], $settings[1], $settings[2]); } } ?>