有人能帮我处理这个if语句吗?
我的表单每次加载页面时都会出现,但在提交表单后它就会消失!
也许是“endif”语法让我困惑,但我无法正确地完成这项工作。。。
代码如下:
if ($this->input->post('submit') && $this->input->post('categories')):
foreach($tagedImages as $image):
?>
endforeach;
elseif(isset($photosQuery) && count($photosQuery)):
foreach($photosQuery->result_array() as $photo):
?>
endforeach;
endif;
$options = array(
'bracelet' => 'Bracelets',
'ring' => 'Rings',
'bag' => 'Bags',
'earing' => 'Earings'
);
echo form_open("toKoritsi/gallery");
echo form_dropdown('categories', $options, 'bracelet');
echo form_submit('submit', 'Choose');
echo form_close();
?>
提前谢谢!