我有一个下拉菜单,其中包含来自数据库的动态设置值:
view
选择一个值后,如何根据所选选项加载特定值?
我现在让它根据选择的选项加载一个特定的视图:
代码:
if (isset($_REQUEST['general_options'])) {
$page = strtolower(str_replace(" ", "", $_REQUEST['general_options']));
$this->load->view( $page, $data, FALSE);
}
如何根据所选问题动态生成包含特定问题的表单?
HTML:
<label for="general_options">Quote Type: </label>
<select name="general_options" id="general_options">
<option value="Graphic Design">Graphic Design</option>
<option value="Content Management System">Content Management System</option>
<option value="Shopping Cart">Shopping Cart</option>
<option value="E-Mail Marketing">E-Mail Marketing</option>
</select>