我被困在寫一個簡單的表單......我覺得愚蠢。Codeigniter:簡單的表單功能
這裏是我的控制器:
function welcome_message(){
//Update welcome message
$id = $this->session->userdata('id');
$profile['welcome_message'] = $this->input->post('welcome_message');
$this->db->update('be_user_profiles',$profile, array('user_id' => $id));
}
和HTML:
<?php print form_open('home/welcome_message')?>
<input type="checkbox" value="0" checked="false">Don't show me this again</input>
<p>
<input class="button submit" type="submit" class="close-box" value="Close" />
</p>
<?php print form_close()?>
編輯 我只是需要它提交給一個私人的功能,並返回到主頁(頁面提交)。
究竟發生了什麼?什麼是錯誤? – bschaeffer 2010-05-07 19:11:49
對不起,我太倉促了。我的編輯有幫助嗎? – 2010-05-07 19:15:27
......編輯的答案有意義嗎? – bschaeffer 2010-05-07 19:22:00